Xianqing He has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16353


Change subject: IMPALA-10096: Use the ordinal if the group by ordinal reference 
is still a numeric literal
......................................................................

IMPALA-10096: Use the ordinal if the group by ordinal reference is still a 
numeric literal

The SelectStmt's groupingExprs_ using the analyzed version and the
ordinal reference will be substituted.
It will throw exception if the ordinal reference is still a numeric
literal, because we will re-analyze after sql rewritten.
For example,
select 13, id, count(1) from dimtbl group by 1, 2;
The rewritten sql should be
select 13, id, count(*) from dimtbl group by 1, id;

Testing:
 - Added new unit tests with ordinal in SELECT and GROUP BY
 - Ran 'mvn test' for the FE

Change-Id: I34f659d15073d69aa0a4685f56ad94557df86560
---
M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
M testdata/workloads/functional-planner/queries/PlannerTest/aggregation.test
2 files changed, 25 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/16353/1
--
To view, visit http://gerrit.cloudera.org:8080/16353
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34f659d15073d69aa0a4685f56ad94557df86560
Gerrit-Change-Number: 16353
Gerrit-PatchSet: 1
Gerrit-Owner: Xianqing He <[email protected]>

Reply via email to