Skip to content

fix(sql): fix order by removal in nested queries inside set operations#2970

Merged
bluestreak01 merged 3 commits intomasterfrom
bz_fix_set_operations_with_order_by_and_limit
Feb 13, 2023
Merged

fix(sql): fix order by removal in nested queries inside set operations#2970
bluestreak01 merged 3 commits intomasterfrom
bz_fix_set_operations_with_order_by_and_limit

Conversation

@bziobrowski
Copy link
Contributor

Fixes #2904

PR Fixes bad order by ignore/removal in second and later subqueries of set operations (EXCEPT , UNION, UNION ALL, INTERSECT ).
Also fixes bad column name resolution in explain plan for DeferredSingleSymbolFilterDataFrame.

@ideoma
Copy link
Collaborator

ideoma commented Feb 7, 2023

[PR Coverage check]

😍 pass : 6 / 7 (85.71%)

file detail

path covered line new line coverage
🔵 io/questdb/griffin/SqlOptimiser.java 4 5 80.00%
🔵 io/questdb/griffin/engine/table/SymbolIndexRowCursorFactory.java 2 2 100.00%

@bluestreak01 bluestreak01 merged commit 4be6e84 into master Feb 13, 2023
@bluestreak01 bluestreak01 deleted the bz_fix_set_operations_with_order_by_and_limit branch February 13, 2023 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UNION ALL doesn't work correctly in combination with LIMIT

4 participants