mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Merge branch 'master' into lattice-fix
This commit is contained in:
commit
6f06a6cba3
4 changed files with 26 additions and 4 deletions
|
|
@ -1295,7 +1295,10 @@ func (e *executor) executePercentile(ctx context.Context, qcx *Qcx, index string
|
|||
min, max := minVal.Val, maxVal.Val
|
||||
// estimate nth val, eg median when nth=0.5
|
||||
for min < max {
|
||||
possibleNthVal := (max + min) / 2
|
||||
// compute average without integer overflow, then correct for division of
|
||||
// odd numbers by 2
|
||||
possibleNthVal := ((max / 2) + (min / 2)) + (((max % 2) + (min % 2)) / 2)
|
||||
// possibleNthVal = (max + min) / 2
|
||||
// get left count
|
||||
rangeCall.Args[fieldName] = &pql.Condition{
|
||||
Op: pql.Token(pql.LT),
|
||||
|
|
|
|||
|
|
@ -6939,7 +6939,7 @@ func variousQueriesOnPercentiles(t *testing.T, c *test.Cluster) {
|
|||
possibleNthVal := int64(0)
|
||||
// bin search
|
||||
for min < max {
|
||||
possibleNthVal = (max + min) / 2
|
||||
possibleNthVal = ((max / 2) + (min / 2)) + (((max % 2) + (min % 2)) / 2)
|
||||
leftCount, rightCount := int64(0), int64(0)
|
||||
for _, num := range nums {
|
||||
if num < possibleNthVal {
|
||||
|
|
|
|||
16
lattice/.gitignore
vendored
Normal file
16
lattice/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
|
@ -104,10 +104,13 @@ export const QueryBuilder: FC<QueryBuilderProps> = ({
|
|||
useEffect(() => {
|
||||
setGroupByFilters(
|
||||
queriesList.filter(
|
||||
(q) => q.table === selectedTable.name && q.operation === 'Extract'
|
||||
(q) =>
|
||||
q.table === selectedTable.name &&
|
||||
q.operation === 'Extract' &&
|
||||
q.rowCalls.length > 0
|
||||
)
|
||||
);
|
||||
}, [selectedTable]);
|
||||
}, [selectedTable, queriesList]);
|
||||
|
||||
const getColumnsToShow = (cols?: { name: string; show: boolean }[]) => {
|
||||
let columns: string[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue