-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behavior
Description
Describe the bug
"lt join" returns incorrect result on data with the same timestamp
To Reproduce
create table tank(SequenceNumber int, ts timestamp)
timestamp(ts) ;
insert into tank values('2021-07-26T02:36:02.566000Z',1);
insert into tank values('2021-07-26T02:36:03.094000Z',2);
insert into tank values('2021-07-26T02:36:03.097000Z',3);
insert into tank values('2021-07-26T02:36:03.097000Z',4);
insert into tank values('2021-07-26T02:36:03.097000Z',5);
insert into tank values('2021-07-26T02:36:03.097000Z',6);
insert into tank values('2021-07-26T02:36:03.098000Z',7);
insert into tank values('2021-07-26T02:36:03.098000Z',8);
select w1.ts, w2.SequenceNumber - w1.SequenceNumber
from tank w1
lt join tank w2;Returned results:
ts column
2021-07-26T02:36:02.566000Z null
2021-07-26T02:36:03.094000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.097000Z 2
2021-07-26T02:36:03.097000Z 3
2021-07-26T02:36:03.098000Z 1
2021-07-26T02:36:03.098000Z 2
Expected behavior
Return result like this:
ts SequenceNumber
2021-07-26T02:36:02.566000Z null
2021-07-26T02:36:03.094000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.097000Z 1
2021-07-26T02:36:03.098000Z 1
2021-07-26T02:36:03.098000Z 1
Environment (please complete the following information):
- OS: Ubuntu 20.04.2 LTS
- Version: 6.0.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behavior