vvivekiyer commented on code in PR #8518: URL: https://github.com/apache/pinot/pull/8518#discussion_r852301842
########## pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/PredicateComparisonRewriter.java: ########## @@ -18,21 +18,27 @@ */ package org.apache.pinot.sql.parsers.rewriter; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.apache.commons.lang3.EnumUtils; import org.apache.pinot.common.request.Expression; +import org.apache.pinot.common.request.ExpressionType; import org.apache.pinot.common.request.Function; import org.apache.pinot.common.request.PinotQuery; import org.apache.pinot.common.utils.request.RequestUtils; import org.apache.pinot.pql.parsers.pql2.ast.FilterKind; import org.apache.pinot.sql.parsers.SqlCompilationException; - public class PredicateComparisonRewriter implements QueryRewriter { @Override public PinotQuery rewrite(PinotQuery pinotQuery) { Expression filterExpression = pinotQuery.getFilterExpression(); if (filterExpression != null) { + filterExpression = updateBooleanPredicates(filterExpression, null); Review Comment: Done. A question: - Based on my understanding, we cannot have predicates that need to be converted to boolean expression in a HAVING clause - because it'll always work on an aggregation (eg: HAVING sum(field) > 10). Am I missing something? - That's the reason I decided to not make these changes within `updateComparisonPredicate` earlier. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org