apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.53k stars 1.3k forks source link

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

Open 61yao opened 2 years ago

61yao commented 2 years ago

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.

61yao commented 2 years ago

The join one should be fixed by https://github.com/apache/pinot/pull/9775 but we should double check all empty table handling.