-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Add the ability to access a specific column in a labeled tuple
This work is yet another step towards #16971. The labeled tuples introduced in #25283 can now be accessed using their labels. It's important to note that they require an extra parentheses around them to do so. ```sql SELECT (((1,'2',true) AS a, b, c)).a +---+ | a | +---+ | 1 | +---+ SELECT (((1,'2',true) AS a, b, c)).b +---+ | b | +---+ | 2 | +---+ SELECT (((1,'2',true) AS a, b, c)).c +------+ | c | +------+ | true | +------+ ``` This change prompted the need to restrict the labels in the tuple to be unique; checks and test cases for that have been added as well. Star expansion is still not allowed. Release note: Labeled tuples can now be accessed using their labels (e.g. `SELECT (((1,'2',true) AS a, b, c)).a` but it requires an extra level of parentheses to do so.
- Loading branch information
1 parent
51871d9
commit c249d45
Showing
9 changed files
with
205 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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