Jackie-Jiang commented on a change in pull request #6957:
URL: https://github.com/apache/incubator-pinot/pull/6957#discussion_r637153642
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/optimizer/QueryOptimizer.java
##########
@@ -59,11 +62,13 @@ public void optimize(BrokerRequest brokerRequest, @Nullable
Schema schema) {
*/
public void optimize(PinotQuery pinotQuery, @Nullable Schema schema) {
Expression filterExpression = pinotQuery.getFilterExpression();
- if (filterExpression != null) {
- for (FilterOptimizer filterOptimizer : FILTER_OPTIMIZERS) {
+ for (FilterOptimizer filterOptimizer : FILTER_OPTIMIZERS) {
+ if (filterExpression != null && filterExpression.getType() ==
ExpressionType.FUNCTION) {
Review comment:
Currently the filter expression can only be function or boolean literal,
so the intention here is to short-circuit the extra filter optimizer if the
filter is already optimized to a boolean literal.
While this is not closely related to the scope of this PR, and in the future
we might want to support column/udf as the filter, so reverting this part to
keep it flexible.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]