[
https://issues.apache.org/jira/browse/IMPALA-11567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602539#comment-17602539
]
ASF subversion and git services commented on IMPALA-11567:
----------------------------------------------------------
Commit 2e1ce445b24aba7d851475512a4c0378cbae0b4f in impala's branch
refs/heads/master from Csaba Ringhofer
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=2e1ce445b ]
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
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]>
> Error in left outer join if the right side is a subquery with complex types
> ---------------------------------------------------------------------------
>
> Key: IMPALA-11567
> URL: https://issues.apache.org/jira/browse/IMPALA-11567
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 4.1.0
> Reporter: Csaba Ringhofer
> Assignee: Csaba Ringhofer
> Priority: Major
> Labels: complextype
>
> repro in Impala dev env:
> {code}
> use functional_parquet;
> select a.id, a.int_1d, b.int_1d from (select id, unnest(int_1d) as int_1d
> from array_tbl) a left outer join (select id, int_1d from array_tbl) b on
> a.id = b.id;
> ERROR: IllegalStateException: Should not evaluate on complex type:
> SlotRef{label=int_1d, path=int_1d, type=ARRAY<INT>, id=6}
> {code}
> The error comes from here:
> https://github.com/apache/impala/blob/37f44a58f3f9d515e9c74455037c654542ac6566/fe/src/main/java/org/apache/impala/analysis/TupleIsNullPredicate.java#L165
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]