Xuebin Su has uploaded this change for review. ( 
https://gerrit.cloudera.org/25284


Change subject: IMPALA-15714: Fix parsing error for SQL from UnpivotTableRef
......................................................................

IMPALA-15714: Fix parsing error for SQL from UnpivotTableRef

Previously, when generating SQL from an UnpivotTableRef, the expression
the was written first, folllowed by the column name. This was
inconsistent with what the parser expected. As the result, the generated
SQL could not be parsed.

This patch fixes the issue by reversing the order: write the column name
first, followed by the expression to identify the source column in the
result column.

Testing:
- Added E2E tests.

Change-Id: I8e9393325130d7da08b5aa9ffab4e0c08e3b9e8a
---
M fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
M fe/src/main/java/org/apache/impala/analysis/UnpivotTableRef.java
M testdata/workloads/functional-query/queries/QueryTest/unpivot-clause.test
3 files changed, 18 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/84/25284/1
--
To view, visit https://gerrit.cloudera.org/25284
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e9393325130d7da08b5aa9ffab4e0c08e3b9e8a
Gerrit-Change-Number: 25284
Gerrit-PatchSet: 1
Gerrit-Owner: Xuebin Su <[email protected]>

Reply via email to