Alex Behm has uploaded a new change for review. http://gerrit.cloudera.org:8080/4815
Change subject: IMPALA-4336: Cast exprs after unnesting union operands. ...................................................................... IMPALA-4336: Cast exprs after unnesting union operands. The bug was that we cast the result exprs of operands before unnesting them. If we unnested an operands, casts were missing on those unnested operands' result exprs. The fix is to first unnest operands and then cast result exprs. Also clarifies the use of resultExprs vs. baseTblResultExprs in unions. We should consistently use resultExprs because the final expr substitution happens during planning. The only place where baseTblResultExprs should be used is in UnionStmt.materializeRequiredSlots() because that is called before plan generation and we need to mark the slots of resolved exprs as materialized. Change-Id: I5e3ab7349df7d67d0d9c2baf4a56342d3f04e76d --- M fe/src/main/java/org/apache/impala/analysis/Expr.java M fe/src/main/java/org/apache/impala/analysis/UnionStmt.java M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java M fe/src/main/java/org/apache/impala/planner/UnionNode.java M testdata/workloads/functional-query/queries/QueryTest/union.test 5 files changed, 111 insertions(+), 89 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/15/4815/1 -- To view, visit http://gerrit.cloudera.org:8080/4815 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e3ab7349df7d67d0d9c2baf4a56342d3f04e76d Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Alex Behm <[email protected]>
