mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
correct k calculation and change test nth values
This commit is contained in:
parent
40e3acc3e4
commit
d3438e8a80
2 changed files with 2 additions and 2 deletions
|
|
@ -1365,7 +1365,7 @@ func (e *executor) executePercentile(ctx context.Context, qcx *Qcx, index string
|
|||
rangeCall = intersectCall.Children[0]
|
||||
}
|
||||
|
||||
k := (1 - nth) / nth
|
||||
k := (100 - nth) / nth
|
||||
|
||||
min, max := minVal.Val, maxVal.Val
|
||||
// estimate nth val, eg median when nth=0.5
|
||||
|
|
|
|||
|
|
@ -7127,7 +7127,7 @@ func variousQueriesOnPercentiles(t *testing.T, c *test.Cluster) {
|
|||
}
|
||||
|
||||
// generate test cases per each nth argument
|
||||
nths := []float64{0.0, 10, 25, 50, 75, 90, 99.99}
|
||||
nths := []float64{0.0, 10, 25, 50, 75, 90, 99}
|
||||
var tests []testCase
|
||||
for _, nth := range nths {
|
||||
query := fmt.Sprintf(`Percentile(field="net_worth", filter=Row(val="foo"), nth=%f)`, nth)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue