-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql/opt: support anonymous subqueries in CREATE FUNCTION #97544
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! The f_subquery_unaliased
and f_ambiguous
tests in pkg/sql/logictest/testdata/logic_test/udf_star
should no longer have an error, so you'll need to update the logic test:
CREATE FUNCTION f_subquery_unaliased() RETURNS INT AS |
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball and @michae2)
9c49457
to
a21fe3b
Compare
Done. (Turns out it wasn't the only one!) |
a21fe3b
to
2d42c84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @michae2 and @rharding6373)
Release note (bug fix): CockroachDB now supports using subqueries in UDFs without an AS clause, for consistency with the syntax supported outside of UDFs. (Subqueries without an AS clause is a CRDB-specific extension.)
The new tests revealed this separate issue #97546, which i will not let hold up this PR. |
2d42c84
to
c5fb4a5
Compare
97515: sql: allow stars inside view definitions r=DrewKimball,rharding6373 a=knz First commit from #97544. Fixes #10028. Release note (sql change): It is now possible to use `*` inside CREATE VIEW. The list of columns is expanded at the time the view is created, so that new columns added after the view was defined are not included in the view. This behavior is the same as PostgreSQL. Co-authored-by: Raphael 'kena' Poss <[email protected]>
Thanks @knz! |
Needed for #97515.
Fixes #96375.
Release note (bug fix): CockroachDB now supports using subqueries in UDFs without an AS clause, for consistency with the syntax supported outside of UDFs. (Subqueries without an AS clause is a CRDB-specific extension.)