Jackie-Jiang commented on code in PR #11956:
URL: https://github.com/apache/pinot/pull/11956#discussion_r1385237914
##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/RequestContextUtils.java:
##########
@@ -111,11 +111,9 @@ public static FilterContext getFilter(Expression
thriftExpression) {
return getFilter(thriftFunction);
case IDENTIFIER:
// Convert "WHERE a" to "WHERE a = true"
- return new FilterContext(FilterContext.Type.PREDICATE, null,
- new EqPredicate(getExpression(thriftExpression),
getStringValue(RequestUtils.getLiteralExpression(true))));
+ return FilterContext.forPredicate(new
EqPredicate(getExpression(thriftExpression), "true"));
case LITERAL:
- // TODO: Handle literals.
- throw new IllegalStateException();
+ return FilterContext.forConstant(new
LiteralContext(thriftExpression.getLiteral()).getBooleanValue());
Review Comment:
One is used in aggregation FILTER where the expression is already parsed
into context format
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]