You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/07 10:00:43 UTC
[GitHub] [pinot] atris opened a new pull request #7533: Allow Metadata And Dictionary Based Plans for Aggregates For No Op Pr…
atris opened a new pull request #7533:
URL: https://github.com/apache/pinot/pull/7533
…edicates
This PR allows aggregation queries with predicates that are always true to be considered for metadata plans.
Fixes #7463
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7533: Allow Optimal Plans for Aggregates With No Op Predicates
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] atris commented on pull request #7533: Allow Optimal Plans for Aggregates With No Op Predicates
Posted by GitBox <gi...@apache.org>.
atris commented on pull request #7533:
URL: https://github.com/apache/pinot/pull/7533#issuecomment-940803029
Superseded by #7563
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7533: Allow Optimal Plans for Aggregates With No Op Predicates
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] atris closed pull request #7533: Allow Optimal Plans for Aggregates With No Op Predicates
Posted by GitBox <gi...@apache.org>.
atris closed pull request #7533:
URL: https://github.com/apache/pinot/pull/7533
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org