-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution
Description
Describe the bug
See the below reproducer.
To reproduce
create table x as (
select x,
rnd_symbol(4, 10, 10, 0) sym,
cast(172800000000 as timestamp) ts
from long_sequence(100)
) timestamp(ts) partition by day;
select *
from (
(select sym, max(x) from x order by sym limit 0,2)
union all
(select sym, max(x) from x order by sym limit 2,4)
);The above select returns the following record set:
"sym","max"
"FHUDMNJRJP",97
"KFXSBQIYCH",96
"RCMGUPZLXU",100
"KFXSBQIYCH",96
Notice duplicated KFXSBQIYCH records. The bug is that this record is returned only by the first sub-query.
Expected Behavior
No response
Environment
- **QuestDB version**: latest `master`
- **OS**:
- **Browser**:Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugIncorrect or unexpected behaviorIncorrect or unexpected behaviorSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution