Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8143 )
Change subject: IMPALA-4682: Remove Preconditions check from analyzeAggregation(). ...................................................................... IMPALA-4682: Remove Preconditions check from analyzeAggregation(). When one runs a query like 'select * from t order by count(a)' we are incorrectly throwing an IllegalStateException, with a Preconditions check which asserts that the column is not "*". Now, this query is invalid, and we are correctly handling it if "*" is replaced by a specific column: 'select a from t order by count(b)' which produces the error message "ERROR: AnalysisException: select list expression not produced by aggregation output (missing from GROUP BY clause?): a" This patch fixes the handling of "*" in this context, by removing the Preconditions check, so that the error becomes "ERROR: AnalysisException: select list expression not produced by aggregation output (missing from GROUP BY clause?): *" Note that the second changed line is required because selectListItem.Expr_ is null when SelectListItem.isStar_ is true. A new FE unit test has been added for this use case. Change-Id: I57c20aeed401275d45913fedfd61c206c38641b7 Reviewed-on: http://gerrit.cloudera.org:8080/8143 Reviewed-by: Alex Behm <[email protected]> Tested-by: Impala Public Jenkins --- M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Alex Behm: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/8143 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I57c20aeed401275d45913fedfd61c206c38641b7 Gerrit-Change-Number: 8143 Gerrit-PatchSet: 5 Gerrit-Owner: Zoram Thanga <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Zoram Thanga <[email protected]> Gerrit-Reviewer: anujphadke <[email protected]>
