Introduce dynamic table append#15897
Merged
rohangarg merged 77 commits intoapache:masterfrom Mar 1, 2024
Merged
Conversation
rohangarg
reviewed
Feb 27, 2024
Member
rohangarg
left a comment
There was a problem hiding this comment.
Thanks so much for the changes @kgyrtkirk :)
I have left a few comments on the changes, please let me know your thoughts
kgyrtkirk
commented
Feb 27, 2024
vtlim
reviewed
Feb 27, 2024
| Refer to the [Query execution](query-execution.md#inline) page for more details on how queries are executed when you | ||
| use inline datasources. | ||
|
|
||
| ### Dynamic table append `TABLE(APPEND(...))` |
Member
There was a problem hiding this comment.
- Since this has the same native query syntax as
unionshould this content go within the existingunionsection? - Suggest removing the SQL syntax from the header title, so just have
#### Dynamic table append
Member
Author
There was a problem hiding this comment.
I've moved the section to be the next after union
what do you think:
- should this be made a subsection of
union? - should I remove the
nativeas that matches the standard union's behaviour?
Member
There was a problem hiding this comment.
I like both of those ideas. Since the native union behavior is the same, the new content can go in there, and removing the repeated native section won't have people wondering what the difference is.
Co-authored-by: Victoria Lim <vtlim@users.noreply.github.com>
vtlim
reviewed
Feb 28, 2024
Member
vtlim
left a comment
There was a problem hiding this comment.
One comment on heading styling. With that and the changes in #15897 (comment), docs should be all set.
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.
Dynamic table appaned
TABLE(APPEND(...))This is essentially an SQL level syntactic sugar which matches columns by name from multiple tables.
Suppose you have 3 tables:
table1hascolumn1table2hascolumn2table3hascolumn1,column2,column3It is possible to create an union view of the above tables is possible by using UNION ALL:
However depending on the size of the table's schema it might be quite complicated to do that;
TABLE(APPEND('table1','table2','table3'))represents the same in a more compact form.It adds one additional thing
ColumnType.leastRestrictiveis used to get a common type for themRelease note
Introduce dynamic table append -
SELECT * FROM TABLE(APPEND('table1','table2'))implicitly creates an union based on the table schemas.This PR has: