Quanlong Huang has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19125 )
Change subject: IMPALA-11567: Fix left outer join if the right side is subquery with complex type ...................................................................... IMPALA-11567: Fix left outer join if the right side is subquery with complex type Non-matching rows from the left side will null out all slots from the right side in left outer joins. If the right side is a subquery, it is possible that some returned expressions will be non-NULL even if all slots are NULL (e.g. constants) - these expressions are wrapped as IF(TupleIsNull(tids), NULL, expr) to null them in the non-matching case. The logic above used to hit a precondition for complex types. We can safely ignore complex types for now, as currently the only possible expression that returns a complex type is SlotRef, which doesn't need to be wrapped. We will have to revisit this once functions are added that return complex types. Testing: - added a regression test and ran it Backport notes: - Modify the new test in nested-array-in-select-list.test to use array_tbl instead of collection_tbl. Change-Id: Iaa8991cd4448d5c7ef7f44f73ee07e2a2b6f37ce Reviewed-on: http://gerrit.cloudera.org:8080/18954 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> Reviewed-on: http://gerrit.cloudera.org:8080/19125 Reviewed-by: Csaba Ringhofer <[email protected]> Tested-by: Quanlong Huang <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/TupleIsNullPredicate.java M testdata/workloads/functional-query/queries/QueryTest/nested-array-in-select-list.test 2 files changed, 22 insertions(+), 2 deletions(-) Approvals: Csaba Ringhofer: Looks good to me, approved Quanlong Huang: Verified -- To view, visit http://gerrit.cloudera.org:8080/19125 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: branch-4.1.1 Gerrit-MessageType: merged Gerrit-Change-Id: Iaa8991cd4448d5c7ef7f44f73ee07e2a2b6f37ce Gerrit-Change-Number: 19125 Gerrit-PatchSet: 3 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]>
