-
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.
98162: sql: fix record-returning udfs when used as data source r=rharding6373 a=rharding6373 When record-returning UDFs (both implicit and `RECORD` return types) are used as a data source in a query, the result should be treated as a row with separate columns instead of a tuple, which is how UDF output is normally treated. This PR closes this gap between CRDB and Postgres. For example: ``` CREATE FUNCTION f() RETURNS RECORD AS $$ SELECT 1, 2, 3; $$ LANGUAGE SQL SELECT f() f -------- (1,2,3) SELECT * FROM f() as foo(a int, b int, c int); a | b | c ---+---+--- 1 | 2 | 3 ``` The behavior is the same for implicit record return types. Epic: CRDB-19496 Fixes: #97059 Release note: None Co-authored-by: rharding6373 <[email protected]>
- Loading branch information
Showing
21 changed files
with
535 additions
and
77 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
Oops, something went wrong.