New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support constant filter in QueryContext, and make server able to handle it #11956
Support constant filter in QueryContext, and make server able to handle it #11956
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11956 +/- ##
============================================
- Coverage 61.45% 61.40% -0.05%
+ Complexity 1145 207 -938
============================================
Files 2385 2385
Lines 129065 129137 +72
Branches 19955 19991 +36
============================================
- Hits 79317 79301 -16
- Misses 44023 44083 +60
- Partials 5725 5753 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 37 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm mostly. minor questions
@@ -658,7 +658,7 @@ public void testFilteredAggregations() { | |||
} | |||
|
|||
@Test | |||
void testDeduplicateOrderByExpressions() { | |||
public void testDeduplicateOrderByExpressions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL
case LITERAL: | ||
// TODO: Handle literals. | ||
throw new IllegalStateException(); | ||
return FilterContext.forConstant(new LiteralContext(thriftExpression.getLiteral()).getBooleanValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general question: why do we need to repeat ourselves on these utils one for thrift and one for function context?
it looks like the only difference is one is for WHERE and one is for HAVING?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is used in aggregation FILTER where the expression is already parsed into context format
Currently we rely on broker to remove the constant (true/false) filter, and server doesn't support processing constant filter. This PR adds the server side support to handle constant filter which is needed for multi-stage engine as leaf stage