-
Notifications
You must be signed in to change notification settings - Fork 4.1k
release-26.1: sql: fix SHOW CREATE FUNCTION with column casting to UDT #160126
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
base: release-26.1
Are you sure you want to change the base?
Conversation
Fixes #152233 Fixes #159145 Fixes #87475 Previously, if a function contains cast from a column to UDT in the body, the SHOW CREATE TABLE statement for this function will error out. This commit is to fix it. Release note (bug fix): enable SHOW CREATE TABLE for function created with columns casting to user defined types.
e7c11c1 to
af930bf
Compare
|
Thanks for opening a backport. Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate. |
michae2
left a comment
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.
@michae2 reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @ZhouXing19).
pkg/sql/show_create_clauses.go line 425 at r1 (raw file):
} dEnum, ok := typedExpr.(*tree.DEnum)
Could this also be a DTuple (for a user-defined composite type)?
(I'm trying to understand how the cast_to_composite testcase passes if we don't handle composite types here...)
|
Previously, michae2 (Michael Erickson) wrote…
Sorry, I realized I wrote a silent bug here. For This enum-specific logic is only needed for Fixed this in PR #160424 by explicitly handling the UndefinedColumn error and adding proper support for non-enum UDT types. |
Backport 1/1 commits from #159642 on behalf of @ZhouXing19.
Fixes #152233
Fixes #159145
Fixes #87475
Previously, if a function contains cast from a column to UDT in the body,
the SHOW CREATE TABLE statement for this function will error out. This
commit is to fix it.
Release note (bug fix): enable SHOW CREATE TABLE for function created with
columns casting to user defined types.
Release justification: fix a bug for a common usage of UDF