apache / apache/pinot

[multistage] [bug] Join query issue when left join table is empty

Open
#9,787 1 comment 0 reactions 0 assignees View on GitHub
multi-stage
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.