guojingfeng has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/17781 )
Change subject: IMPALA-10865: Fix initialize SelectStmt's groupingExprs_ in analyzeGroupingExprs ...................................................................... IMPALA-10865: Fix initialize SelectStmt's groupingExprs_ in analyzeGroupingExprs This patch rollback some changes of IMPALA-9620. IMPALA-9620 re- initialize SelectStmt's groupingExprs_ to ensure that group-by and cnf exprs are analyzed. But the following IMPALA-9693 explicit analyze exprs which is equivalent to IMPALA-9620. So this rollback is safe here. In general, the analyze algorithm is that: 1. Analyze the stmt tree and make copies of expressions 2. Rewrite selected expressions, **rewrite rules should keep rewritted exprs are analyzed** 3. Make copied expressions analyzed 4. ReAnalyze the tree The problem is that if we change the groupingExprs_ of SelectStmt, in re-analyze phase column alias will be substitude to Expr that duplicate with origin column which will be removed in `buildAggregateExprs`. Another reason why this patch is submitted is that re-initialize SelectStmt's groupingExprs_ will cause other problems. IMPALA-10096 is a typical case. See jira for detail execeptions. Beside, this patch modify ExtractCompundVerticalBarExprRule to do a explicit analyze to ensure expr are rewritted. Test: - Add new test into aggregation.test and passed - Ran all fe tests and passed Change-Id: I9d1779e6c282d9fd02beacf5ddfafcc5c0baf3b0 --- M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java M fe/src/main/java/org/apache/impala/rewrite/ExtractCompoundVerticalBarExprRule.java M testdata/workloads/functional-planner/queries/PlannerTest/aggregation.test 3 files changed, 29 insertions(+), 15 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/17781/7 -- To view, visit http://gerrit.cloudera.org:8080/17781 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9d1779e6c282d9fd02beacf5ddfafcc5c0baf3b0 Gerrit-Change-Number: 17781 Gerrit-PatchSet: 7 Gerrit-Owner: guojingfeng <guojingf...@tencent.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Tamas Mate <tma...@apache.org> Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com> Gerrit-Reviewer: guojingfeng <guojingf...@tencent.com> Gerrit-Reviewer: wangsheng <sky...@163.com>