Jackie-Jiang commented on a change in pull request #7533:
URL: https://github.com/apache/pinot/pull/7533#discussion_r724394513
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java
##########
@@ -84,6 +85,9 @@
private Map<FunctionContext, Integer> _aggregationFunctionIndexMap;
private Set<String> _columns;
+ // Store the filter operator if it is precomputed
+ private BaseFilterOperator _filterOperator;
Review comment:
We cannot cache operator here because the `QueryContext` is shared among
all the segments, but each segment has its own filter operator
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java
##########
@@ -227,6 +230,24 @@ public PlanNode makeSegmentPlanNode(IndexSegment
indexSegment, QueryContext quer
// Aggregation only query
// Use metadata/dictionary to solve the query if possible
+
+ if (queryContext.getFilter() != null) {
+ // Check if the filter is always true. If true, check if metadata or
dictionary based plans can be used
+ BaseFilterOperator filterOperator = FilterPlanNode
Review comment:
The operator should be constructed within the `PlanNode.run()`
--
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]