mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 19:37:51 +00:00
Separate out tests on Percentile to top level
This commit is contained in:
parent
832c6f1a71
commit
7da218727d
2 changed files with 13 additions and 5 deletions
|
|
@ -1360,6 +1360,7 @@ func (e *executor) executePercentile(ctx context.Context, qcx *Qcx, index string
|
|||
intersectCall.Children = append(intersectCall.Children, filterCall)
|
||||
rangeCall = intersectCall.Children[0]
|
||||
}
|
||||
|
||||
k := (1 - nth) / nth
|
||||
|
||||
min, max := minVal.Val, maxVal.Val
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import (
|
|||
"io/ioutil"
|
||||
"math"
|
||||
"math/rand"
|
||||
_ "net/http/pprof"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
|
@ -6854,8 +6855,15 @@ func TestVariousQueries(t *testing.T) {
|
|||
c := test.MustRunCluster(t, clusterSize)
|
||||
defer c.Close()
|
||||
|
||||
variousQueries(t, clusterSize)
|
||||
variousQueriesOnTimeFields(t, clusterSize)
|
||||
variousQueries(t, c)
|
||||
variousQueriesOnTimeFields(t, c)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestVariousQueriesOnPercentiles(t *testing.T) {
|
||||
for _, clusterSize := range []int{1, 3, 4, 7} {
|
||||
t.Run(fmt.Sprintf("%d-node", clusterSize), func(t *testing.T) {
|
||||
variousQueriesOnPercentiles(t, clusterSize)
|
||||
})
|
||||
}
|
||||
|
|
@ -6987,8 +6995,8 @@ func variousQueriesOnPercentiles(t *testing.T, clusterSize int) {
|
|||
}
|
||||
|
||||
type testCase struct {
|
||||
query string
|
||||
qrVerifier func(t *testing.T, resp pilosa.QueryResponse)
|
||||
query string
|
||||
// qrVerifier func(t *testing.T, resp pilosa.QueryResponse)
|
||||
csvVerifier string
|
||||
}
|
||||
|
||||
|
|
@ -7023,7 +7031,6 @@ func variousQueriesOnPercentiles(t *testing.T, clusterSize int) {
|
|||
|
||||
// TODO: add HTTP and Postgres and ability to convert
|
||||
// those results to CSV to run through CSV verifier
|
||||
>>>>>>> Add basic test for Percentile query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue