dang-stripe commented on code in PR #18064:
URL: https://github.com/apache/pinot/pull/18064#discussion_r3048047941


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/LeafStageToPinotQuery.java:
##########
@@ -98,8 +101,77 @@ private static void handleProject(Project project, 
PinotQuery pinotQuery) {
   private static void handleFilter(Filter filter, PinotQuery pinotQuery) {
     if (filter != null) {
       RexExpression rexExpression = 
RexExpressionUtils.fromRexNode(filter.getCondition());
-      
pinotQuery.setFilterExpression(CalciteRexExpressionParser.toExpression(rexExpression,
-          pinotQuery.getSelectList()));
+      Expression filterExpression = 
CalciteRexExpressionParser.toExpression(rexExpression,
+          pinotQuery.getSelectList());
+      
pinotQuery.setFilterExpression(ensureFilterIsFunctionExpression(filterExpression));

Review Comment:
   this bug seems isolated to the physical optimizer specifically due to the 
RelNode -> PinotQuery conversion in this class so prefer to keep the fixed 
localized here for now.



-- 
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]

Reply via email to