Internal Jenkins has submitted this change and it was merged. Change subject: IMPALA-4303: Do not reset() qualifier of union operands. ......................................................................
IMPALA-4303: Do not reset() qualifier of union operands. The bug: We used to reset() the qualifier of union operands to their original value obtained during parsing. This leads to problems when union operands are unnested and we need to rewrite Subqueries. In particular, the first union operand of a nested union was reset() to a null qualifier, but that operand could be somewhere in the middle of the list of unnested operands in the parent. At that point, we've lost information about the qualifier of the unnested operand. The fix: The simplest solution is to not reset() the qualifier. The other alternative is be to reset() the qualifier, but also undo any unnesting. That seems unnecessary and wasteful. Change-Id: I157bb0f08c4a94fd779487d7c23edd64a537a1f6 Reviewed-on: http://gerrit.cloudera.org:8080/4963 Reviewed-by: Alex Behm <alex.b...@cloudera.com> Tested-by: Internal Jenkins --- M fe/src/main/java/org/apache/impala/analysis/UnionStmt.java M testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test 2 files changed, 74 insertions(+), 12 deletions(-) Approvals: Internal Jenkins: Verified Alex Behm: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/4963 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I157bb0f08c4a94fd779487d7c23edd64a537a1f6 Gerrit-PatchSet: 4 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Marcel Kornacker <mar...@cloudera.com>