feat(online): union all query#3590
Merged
aceforeverd merged 2 commits into4paradigm:mainfrom Dec 4, 2023
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3590 +/- ##
=============================================
+ Coverage 40.14% 74.94% +34.80%
Complexity 635 635
=============================================
Files 191 724 +533
Lines 11207 130710 +119503
Branches 1317 1317
=============================================
+ Hits 4499 97966 +93467
- Misses 6417 32453 +26036
Partials 291 291 ☔ View full report in Codecov by Sentry. |
0bf34d0 to
5087a99
Compare
5087a99 to
2d585b4
Compare
Re-impl column to source info in physical node, support multiple result source info, previously it is one result only. Multiple source result is required for SetOperationNode, like union all, every input node may produce the target column.
2d585b4 to
6a03397
Compare
This was referenced Nov 21, 2023
dl239
approved these changes
Dec 4, 2023
lqy222
approved these changes
Dec 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SYNTAX
UNION is one kind of set operation, currently it support UNION only.
set_operation: query_expr UNION { DISTINCT | ALL } query_expr query_expr: [ WITH {non_recursive_cte}[, ...] ] { select | ( query_expr ) | set_operation } [ ORDER BY expression [, ...] ] [ LIMIT count ] select: SELECT select_list [ FROM from_clause[, ...] ] [ WHERE bool_expression ] [ GROUP BY group_by_specification ] [ HAVING bool_expression ] [ WINDOW window_clause ]Rules
1. ONLY UNION ALL
2. `UNION output result, with ordering undefined by default.
Say
SELECT * FROM t1 UNION ALL SELECT * FROM t2, and assume two inputs source for UNION is know as ordered. UNION result may still not ordered.3. support with other SQL clauses
4. Online Rules
PATTERN:
LAST JOIN ( UNION ALL (t1, t2) )