mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
Restore filter argument
This commit is contained in:
parent
66d12f88e2
commit
832c6f1a71
1 changed files with 4 additions and 7 deletions
|
|
@ -6894,16 +6894,13 @@ func variousQueriesOnPercentiles(t *testing.T, clusterSize int) {
|
|||
rowKey: rowKeys[r.Uint64()%2], // flip a coin
|
||||
}
|
||||
}
|
||||
r.Shuffle(len(testValues), func(i, j int) {
|
||||
testValues[i], testValues[j] = testValues[j], testValues[i]
|
||||
})
|
||||
|
||||
// filter out nums that fulfil predicate
|
||||
var nums []int64
|
||||
for _, v := range testValues {
|
||||
// if v.rowKey == "foo" {
|
||||
nums = append(nums, v.num)
|
||||
// }
|
||||
if v.rowKey == "foo" {
|
||||
nums = append(nums, v.num)
|
||||
}
|
||||
}
|
||||
|
||||
// get min and max for calculating both expected median
|
||||
|
|
@ -6999,7 +6996,7 @@ func variousQueriesOnPercentiles(t *testing.T, clusterSize int) {
|
|||
nths := []float64{0.1, 0.25, 0.5, 0.75, 0.9, 0.99}
|
||||
var tests []testCase
|
||||
for _, nth := range nths {
|
||||
query := fmt.Sprintf(`Percentile(field="net_worth", nth=%f)`, nth)
|
||||
query := fmt.Sprintf(`Percentile(field="net_worth", filter=Row(val="foo"), nth=%f)`, nth)
|
||||
expectedPercentile := getExpectedPercentile(nums, nth)
|
||||
tests = append(tests, testCase{
|
||||
query: query,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue