Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14063
Change subject: IMPALA-8790: fix referencing wrong grouping exprs of MultiAggregateInfo ...................................................................... IMPALA-8790: fix referencing wrong grouping exprs of MultiAggregateInfo When creating the single node plan for analytic functions (see SingleNodePlanner#createQueryPlan), if the query block contains aggregations, the grouping exprs are carried on for optimizations (see AnalyticPlanner#computeInputPartitionExprs). This patch fixes a regression bug due to IMPALA-110 in this phase. The pre-IMPALA-110 behavior is carrying the groupingExprs of the AggregateInfo (if has). Those exprs are already substituted in AggregationNode#init calling from SingleNodePlanner#createSelectPlan. Now the behavior is carrying the groupingExprs of the MultiAggregateInfo (if has). Those exprs are not substituted in AggregationNode#init. Instead, MultiAggregateInfo creates a substituted grouping exprs in this step. They are what we actually need. The original grouping exprs may use non-materialized slots, which should not be referenced in exchanges. Also add some useful TRACE logs for future debugging. Tests - Add planner tests to cover the regression bug. - Run CORE tests Change-Id: I11a80bd6d73ea00ad8c644469558a1885706f596 --- M fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java M fe/src/main/java/org/apache/impala/planner/Planner.java M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test 4 files changed, 109 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/63/14063/2 -- To view, visit http://gerrit.cloudera.org:8080/14063 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I11a80bd6d73ea00ad8c644469558a1885706f596 Gerrit-Change-Number: 14063 Gerrit-PatchSet: 2 Gerrit-Owner: Quanlong Huang <huangquanl...@gmail.com>