[
https://issues.apache.org/jira/browse/CALCITE-6593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884403#comment-17884403
]
Ruben Q L commented on CALCITE-6593:
------------------------------------
Just to confirm [~julianhyde], what you are proposing is:
- Finalize the current ticket, combining [~rrueda]'s patch and my patch to
stabilize CALCITE-3094's code.
- Release 1.38
- Continue the work on Flink splitter (CALCITE-6465) with targetVersion 1.39.
When CALCITE-6465 gets committed, we can consider reverting CALCITE-3094
(including also the code of the current ticket); if we confirm that Flink's
splitter fixes CALCITE-3094; i.e. we would need to confirm that CALCITE-3094's
unit tests (LargeGeneratedJoinTest) work fine once reverting CALCITE-3094's
code and activating CALCITE-6465's flag.
- Release 1.39 rather soon, which would include CALCITE-6465 and Avatica
upgrade (among others).
> NPE when outer joining tables with many fields and unmatching rows
> ------------------------------------------------------------------
>
> Key: CALCITE-6593
> URL: https://issues.apache.org/jira/browse/CALCITE-6593
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Rodrigo Rueda
> Assignee: Ruben Q L
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> The fix for CALCITE-3094 started generating the following code for a join
> when the resulting field count is >= 100.
> {code:java}
> public Object[] apply(Object[] left, Object[] right) {
> Object[] outputArray = new Object[102];
> System.arraycopy(left, 0, outputArray, 0, 94);
> System.arraycopy(right, 0, outputArray, 94, 8);
> return outputArray;
> } {code}
> But left or right might be null if one of the sides of the join is empty,
> which leads to a NPE:
> {code:java}
> java.lang.NullPointerException
> at java.base/java.lang.System.arraycopy(Native Method)
> at Baz$3.apply(Unknown Source)
> at Baz$3.apply(Unknown Source)
> at Baz$3.apply(Unknown Source)
> at
> org.apache.calcite.linq4j.EnumerableDefaults$12$1.current(EnumerableDefaults.java:2078)
> at Baz$4$1.current(Unknown Source) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)