change nth value limit message and number of test int64 nth values

This commit is contained in:
Maxton Huff 2021-03-26 16:54:44 -05:00
parent f06c13abcd
commit 4ce71eeddf
2 changed files with 2 additions and 2 deletions

View file

@ -1319,7 +1319,7 @@ func (e *executor) executePercentile(ctx context.Context, qcx *Qcx, index string
}
if OK {
if nthFloat < 0 || nthFloat > 100.0 {
return ValCount{}, errors.Errorf("Percentile(): invalid nth value (%f), should be >= 0 and <= 100", nthFloat)
return ValCount{}, errors.Errorf("Percentile(): invalid nth value (%f), should be between 0 and 100 inclusive", nthFloat)
}
} else if c.Args["nth"] == nil {
return ValCount{}, errors.New("Percentile(): nth required")

View file

@ -7137,7 +7137,7 @@ func variousQueriesOnPercentiles(t *testing.T, c *test.Cluster) {
csvVerifier: fmt.Sprintf("%d,1\n", expectedPercentile),
})
}
nthsInt := []int64{0, 10, 25, 50, 75, 90, 99}
nthsInt := []int64{10}
for _, nth := range nthsInt {
query := fmt.Sprintf(`Percentile(field="net_worth", filter=Row(val="foo"), nth=%d)`, nth)
expectedPercentile := getExpectedPercentile(nums, float64(nth))