Add RANGE FilterKind to support merging ranges for SQL #5898
+15
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently we cannot replace
BrokerRequest
withPinotQuery
completely because of the filter optimizer only works onBrokerRequest
. One of the optimizations is to merge ranges joined by AND (very useful especially for hybrid table).We cannot apply the same optimization to
PinotQuery
without a newRANGE
FilterKind (e.g. no way to represent a > 10 AND a <= 20).This PR introduces the new
RANGE
FilterKind so that Server knows how to process it.After release
0.5.0
, we can add the optimizer forPinotQuery
so that Broker can optimizePinotQuery
, and Server already knows how to process theRANGE
filter.Also let Server support both
'\0'
and"\t\t"
as the range delimiter so that it can work on string values with'\t'
inside properly.