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 2020/05/14 01:42:19 UTC

[GitHub] [incubator-pinot] mayankshriv opened a new pull request #5382: Temporary work-around to bypass function arguments being treated as expressions with columns.

mayankshriv opened a new pull request #5382:
URL: https://github.com/apache/incubator-pinot/pull/5382


   Only aggregation functions have the knowledge on how to interpret their arguments.
   However, the assumption within ServerQueryRequest is that all expression arguments will contain
   columns to be collected. A clean fix would be to create aggregation functions upfront and let
   them interpret the arguments. However, until that happens, working-around by assuming that first
   argument contains all the columns (to be used by DataSchemaPruner), which is true for all functions.
   
   A side effect would be that DataSchemaPruner won't work for DistinctCountThetaSketchAggregatinoFunction.
   But since this pruner is only for schema mis-matches, and not for performance, there should not be
   an impact.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #5382: Temporary work-around to bypass function arguments being treated as expressions with columns.

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #5382:
URL: https://github.com/apache/incubator-pinot/pull/5382#discussion_r424824630



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/request/ServerQueryRequest.java
##########
@@ -94,10 +94,12 @@ public ServerQueryRequest(InstanceRequest instanceRequest, ServerMetrics serverM
     if (aggregationsInfo != null) {
       _aggregationExpressions = new HashSet<>();
       for (AggregationInfo aggregationInfo : aggregationsInfo) {
-        if (!aggregationInfo.getAggregationType().equalsIgnoreCase(AggregationFunctionType.COUNT.getName())) {
-          for (String expressions : AggregationFunctionUtils.getArguments(aggregationInfo)) {
-            _aggregationExpressions.add(TransformExpressionTree.compileToExpressionTree(expressions));
-          }
+        String aggregationType = aggregationInfo.getAggregationType();

Review comment:
       I would recommend specialize THETA_SKETCHES, so that it won't affect DISTINCT




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] mayankshriv commented on a change in pull request #5382: Temporary work-around to bypass function arguments being treated as expressions with columns.

Posted by GitBox <gi...@apache.org>.
mayankshriv commented on a change in pull request #5382:
URL: https://github.com/apache/incubator-pinot/pull/5382#discussion_r424826914



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/request/ServerQueryRequest.java
##########
@@ -94,10 +94,12 @@ public ServerQueryRequest(InstanceRequest instanceRequest, ServerMetrics serverM
     if (aggregationsInfo != null) {
       _aggregationExpressions = new HashSet<>();
       for (AggregationInfo aggregationInfo : aggregationsInfo) {
-        if (!aggregationInfo.getAggregationType().equalsIgnoreCase(AggregationFunctionType.COUNT.getName())) {
-          for (String expressions : AggregationFunctionUtils.getArguments(aggregationInfo)) {
-            _aggregationExpressions.add(TransformExpressionTree.compileToExpressionTree(expressions));
-          }
+        String aggregationType = aggregationInfo.getAggregationType();

Review comment:
       Yeah, I was debating between the two approaches. I missed that we could support expressions in distinct. Will update to special case theta-sketch.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] mayankshriv merged pull request #5382: Temporary work-around to bypass function arguments being treated as expressions with columns.

Posted by GitBox <gi...@apache.org>.
mayankshriv merged pull request #5382:
URL: https://github.com/apache/incubator-pinot/pull/5382


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org