Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent results in online/offline mode while join condition includes null #3685

Open
lqy222 opened this issue Dec 29, 2023 · 2 comments
Assignees
Labels
bug Something isn't working execute-engine hybridse sql engine high-priority

Comments

@lqy222
Copy link
Collaborator

lqy222 commented Dec 29, 2023

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 ]
@lqy222 lqy222 added the bug Something isn't working label Dec 29, 2023
@lqy222 lqy222 assigned aceforeverd and tobegit3hub and unassigned aceforeverd Dec 29, 2023
@aceforeverd
Copy link
Collaborator

ref https://spark.apache.org/docs/3.0.0-preview/sql-ref-null-semantics.html#comp-operators

NULL = NULL outputs NULL, is not True.

@aceforeverd aceforeverd added wontfix This will not be worked on and removed bug Something isn't working labels Dec 30, 2023
@aceforeverd
Copy link
Collaborator

aceforeverd commented Jan 5, 2024

while the offline behavior is expected, related cases:

- id: 19
desc: 拼接条件中有null
tags: [ "TODO", "@chenjing, @baoxinqi" ]
inputs:
- columns: [ "c1 string","c2 int","c3 bigint","c4 timestamp" ]
indexs: [ "index1:c1:c4" ]
rows:
- [ NULL,2,3,1590738989000 ]
- [ "bb",21,31,1590738990000 ]
- columns: [ "c1 string","c2 int","c3 bigint","c4 timestamp" ]
indexs: [ "index1:c1:c4" ]
rows:
- [ NULL,2,3,1590738989000 ]
- [ "bb",22,31,1590738990000 ]
- [ "ab",21,32,1590738993000 ]
- [ "bb",22,31,1590738992000 ]
- [ "bb",22,31,1590738991000 ]
sql: select {0}.c1,{0}.c2,{1}.c3,{1}.c4 from {0} last join {1} ORDER BY {1}.c4 on {0}.c1={1}.c1;
expect:
columns: [ "c1 string","c2 int","c3 bigint","c4 timestamp" ]
order: c1
rows:
- [ null,2,3,1590738989000 ]
- [ "bb",21,31,1590738992000 ]

is turned off in online tests

@aceforeverd aceforeverd removed the wontfix This will not be worked on label Jan 5, 2024
@aceforeverd aceforeverd self-assigned this Jan 8, 2024
@aceforeverd aceforeverd added bug Something isn't working execute-engine hybridse sql engine labels Jan 8, 2024
@lqy222 lqy222 changed the title join error if join condition includes null in offline mode Inconsistent results in online/offline mode while join condition includes null Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execute-engine hybridse sql engine high-priority
Projects
None yet
Development

No branches or pull requests

4 participants