Impala Public Jenkins has submitted this change and it was merged. ( 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 Reviewed-on: http://gerrit.cloudera.org:8080/14063 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- 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(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: I11a80bd6d73ea00ad8c644469558a1885706f596 Gerrit-Change-Number: 14063 Gerrit-PatchSet: 4 Gerrit-Owner: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>