Skip to content
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: udf body rewrite to reference objects by IDs instead of Names #83233

Open
chengxiong-ruan opened this issue Jun 22, 2022 · 3 comments
Open
Labels
A-schema-descriptors Relating to SQL table/db descriptor handling. A-sql-routine UDFs and Stored Procedures C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-sql-queries SQL Queries Team

Comments

@chengxiong-ruan
Copy link
Contributor

chengxiong-ruan commented Jun 22, 2022

Describe the solution you'd like
Design proper syntaxes for sql query rewrites, so that objects can be can be references by IDs in function body instead of names.

Jira issue: CRDB-16938

Epic CRDB-19496

@chengxiong-ruan chengxiong-ruan added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-schema-deprecated Use T-sql-foundations instead labels Jun 22, 2022
@chengxiong-ruan chengxiong-ruan self-assigned this Jun 22, 2022
@postamar postamar added the A-sql-routine UDFs and Stored Procedures label Jul 12, 2022
@chengxiong-ruan chengxiong-ruan changed the title UDF: support cross-reference tracking of objects used in function body UDF: support cross-reference tracking of objects used in function body by id Jul 12, 2022
@chengxiong-ruan chengxiong-ruan changed the title UDF: support cross-reference tracking of objects used in function body by id sql: udf body rewrite to reference objects by IDs instead of Names Sep 9, 2022
@postamar postamar added A-schema-descriptors Relating to SQL table/db descriptor handling. C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. and removed C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Nov 10, 2022
chengxiong-ruan added a commit to chengxiong-ruan/cockroach that referenced this issue Apr 4, 2023
@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
chengxiong-ruan added a commit to chengxiong-ruan/cockroach that referenced this issue Jun 22, 2023
@chengxiong-ruan chengxiong-ruan removed their assignment Jul 20, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Jul 20, 2023
@chengxiong-ruan
Copy link
Contributor Author

I stopped working on this as there're things @mgartner wants to improve with AST annotation in optimizer. So assigning this to Queries team as well. I'm keep Foundations tag just for awareness. cc @rimadeodhar and @rafiss .

@rafiss rafiss removed the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jul 21, 2023
@rafiss
Copy link
Collaborator

rafiss commented Jul 21, 2023

Thanks! we'd like to take a look at the PR whenever it's ready

@fqazi
Copy link
Collaborator

fqazi commented Mar 15, 2024

Additionally, need to also do similar for UDF references here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-descriptors Relating to SQL table/db descriptor handling. A-sql-routine UDFs and Stored Procedures C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-sql-queries SQL Queries Team
Projects
Status: Backlog
Development

No branches or pull requests

4 participants