diff --git a/executor_test.go b/executor_test.go index 098247bcc..28fa86792 100644 --- a/executor_test.go +++ b/executor_test.go @@ -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,