datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Left/Full join of the NestedLoopJoin requires the RHS(outer table) to be a FusedStream

Open YjyJeff opened this issue 1 year ago • 0 comments

Describe the bug

According to the code, when the outer table returns None for the first time, the NestedLoopJoinStream may return Some(RecordBatch) to produce the result for the unmatched rows. Therefore, the NestedLoopJoinStream is not exhausted and will be polled again. However, the next poll will also poll the outer_table, when the outer_table does not support the FusedStream, it may panic.

To fix the bug, we could require the execute method returns a FusedStream or add a wrapper for the outer_table

To Reproduce

No response

Expected behavior

No response

Additional context

No response

YjyJeff avatar Aug 27 '24 07:08 YjyJeff