fx19880617 commented on a change in pull request #5070: Support non-literal
expressions for right-side operand in predicate comparison
URL: https://github.com/apache/incubator-pinot/pull/5070#discussion_r384169237
##########
File path:
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -289,6 +289,91 @@ private static PinotQuery
compileCalciteSqlToPinotQuery(String sql) {
return pinotQuery;
}
+ // This method converts a predicate expression to the what Pinot could
evaluate.
+ // For comparison expression, left operand could be any expression, but
right operand only
+ // supports literal.
+ // E.g. 'WHERE a > b' will be updated to 'WHERE a - b > 0'
+ private static Expression updateComparisonPredicate(Expression expression) {
Review comment:
Adding a queryRewrite method, also moved alias map into it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]