[multistage][bug] 3 way join result in inconsistent data
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 189
Description
using SSB as example, the following produce in consistent results (num of rows)
```
select
P_MFGR,
D_YEAR,
LO_REVENUE
from lineorder
JOIN dates ON LO_ORDERDATE = D_DATEKEY
JOIN part ON LO_PARTKEY = P_PARTKEY
where 1=1
and (D_YEAR = 1997 or D_YEAR = 1998)
and P_CATEGORY = 'MFGR#14'
```
where as
```
select
P_MFGR,
LO_REVENUE
from lineorder
JOIN part ON LO_PARTKEY = P_PARTKEY
where 1=1
and P_CATEGORY = 'MFGR#14'
```
```
select
D_YEAR,
LO_REVENUE
from lineorder
JOIN dates ON LO_ORDERDATE = D_DATEKEY
where 1=1
and (D_YEAR = 1997 or D_YEAR = 1998)
```
produce correct number of rows consistently.
Contributor guide
Research direction
Start by running the supplied SSB queries and comparing their row counts, focusing on the multistage three-way join versus the two separate joins. Trace the multistage join execution path in Pinot and identify where the combined query diverges; done means the three-way query returns the consistent result shown by the separate queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100