Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
See stack trace below:
Caused by: java.lang.NullPointerException at org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode.join(CorrelatedNestedLoopJoinNode.java:362) at org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode.lambda$onRequest$1(CorrelatedNestedLoopJoinNode.java:274) at org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:320) ... 4 more
To reproduce the issue, run TPC-H q21 with sf=0.1 on 3-node cluster
Update
The following sequence occurs:
- CorrelatedNestedLoopJoinNode pushes last row to downstream (FilterNode). See joinType == JoinRelType.LEFT branch in join() method.
- FilterNode receives last requested row and tries to request next batch from the upstream (CorrelatedNestedLoopJoinNode).
- CorrelatedNestedLoopJoinNode is in IDLE state (which is incorrect), so it submits join() to the execution queue.
- CorrelatedNestedLoopJoinNode resets rightInBuf, changes state to FILLING_LEFT and requests rows from leftsource().
- Previously submitted join() starts executing and crashes with NullPointerException, because rightInBuf is null.
Attachments
Issue Links
- blocks
-
IGNITE-21579 Sql. Investigate performance bottlenecks in sql engine
- Resolved
- is related to
-
IGNITE-23345 Calcite engine. Correlated nested loop LEFT join failure
- Patch Available
- links to
amashenkov, korlov,
could you take a look at this small fix, please?