4paradigm / 4paradigm/OpenMLDB
Inconsistent results in online/offline mode while join condition includes null
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 331
- Avg merge
- 12d 12h
- Merged PRs (30d)
- 1
Description
```
table: t1
columns: [ "c1 string","c2 int","c3 bigint","c4 timestamp" ]
indexs: [ "index1:c1:c4" ]
rows:
- [ NULL,2,3,1590738989000 ]
```
```
table: t2
- columns: [ "c1 string","c2 int","c3 bigint","c4 timestamp" ]
indexs: [ "index1:c1:c4" ]
rows:
- [ NULL,2,3,1590738989000 ]
```
`sql: select t1.c1,t1.c2,t2.c3,t2.c4 from t1 last join t2 ORDER BY t2.c4 on t1.c1=t2.c1;`
expect rows:
- [ null,2,3,1590738989000 ]
real rows:
- [ null,2,null,null ]
Contributor guide
Research direction
The issue shows a SQL join query with a NULL equality condition producing different results in online vs offline modes. Start by locating the join implementation for 'last join' in the query engine, likely in the SQL execution or optimizer modules. Examine how NULL comparisons are handled in join conditions across execution modes. Run the provided test case to reproduce the inconsistency, then trace through the join logic to identify the divergence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100