[multistage] [bug] Join query issue when left join table is empty
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 55m
- Merged PRs (30d)
- 182
Description
https://github.com/apache/pinot/blob/c8c6b253ae8f0a8e9e3293b99bd37d946f94a19d/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java#L148 returns an EOS block directly if left table is empty.
However, when right table returns an EOS block directly, we will return an empty table.
The problem with this returning only EOS block is in the mailboxReceiveOperator for EOS block, we close the stream directly. I suspect this will cause problem that we time out on this.
I am not sure if this will happen to all empty tables or just this one.
Contributor guide
Research direction
Start at HashJoinOperator.java line 148 and trace how an empty left table returns an EOS block, then follow EOS handling in mailboxReceiveOperator. Reproduce the behavior with empty left and right tables and determine whether the stream closes or times out. Done means the empty-table join completes with the expected empty result without a timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100