Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
Description
The fix for CALCITE-3094 started generating the following code for a join when the resulting field count is >= 100.
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; }
But left or right might be null if one of the sides of the join is empty, which leads to a NPE:
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)
Attachments
Issue Links
- is caused by
-
CALCITE-3094 Code of method grows beyond 64 KB when joining two tables with many fields
-
- Closed
-
- is related to
-
CALCITE-6465 Rework code generator to use Flink code splitter
-
- Open
-
- links to