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/catalog: remove SchemaKind from SchemaDescriptor #65931

Open
ajwerner opened this issue Jun 1, 2021 · 2 comments
Open

sql/catalog: remove SchemaKind from SchemaDescriptor #65931

ajwerner opened this issue Jun 1, 2021 · 2 comments
Labels
A-schema-catalog Related to the schema descriptors collection and the catalog API in general. 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. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Jun 1, 2021

Is your feature request related to a problem? Please describe.

Before #65142, we had a concept ResolvedSchema which either had a descriptor or had just a modicum of information. This allowed us to cope with the weirdness of public, virtual, and temporary schemas (more or less). In the above referenced PR, we unified this concept around different implementations of the descriptor interface. However, the behavior of these different kinds of descriptors is not perfectly consistent and they do not provide all of the features of a normal schema descriptor. Namely:

  • ParentID is not always set
  • Privileges are not always set

The reason for this is that the objects are singletons today. It seems scary to allocate new objects every time. It feels like a big disruption to #65142 to add it to that already non-trivial and blocking PR.

Describe the solution you'd like

We should store objects for these things from a node-level cache provided to the collection.

Epic: CRDB-2454

Jira issue: CRDB-7804

@ajwerner ajwerner added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-schema-descriptors Relating to SQL table/db descriptor handling. labels Jun 1, 2021
@ajwerner ajwerner added this to Triage in SQL Foundations via automation Jun 1, 2021
@ajwerner ajwerner moved this from Triage to General 21.2 in SQL Foundations Jun 1, 2021
@jlinder jlinder added the T-sql-schema-deprecated Use T-sql-foundations instead label Jun 16, 2021
@ajwerner ajwerner moved this from General 21.2 to Backlog in SQL Foundations Aug 3, 2021
@postamar
Copy link
Contributor

In 22.2 there won't be anything blocking us from doing this anymore.

@postamar postamar moved this from Backlog to 22.2 General in SQL Foundations Mar 11, 2022
@postamar postamar moved this from General to Backlog in SQL Foundations Sep 19, 2022
@postamar postamar added 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
@postamar
Copy link
Contributor

I haven't found the lack of ParentID to be particularly annoying but this is probably worth doing for privileges. It shouldn't be particularly hard.

@postamar postamar added the A-schema-catalog Related to the schema descriptors collection and the catalog API in general. label Nov 10, 2022
@postamar postamar moved this from Backlog to Tech Debt That Nobody Outside Of The Team Cares About in SQL Foundations Nov 10, 2022
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-catalog Related to the schema descriptors collection and the catalog API in general. 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. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
SQL Foundations
  
Tech Debt That Nobody Outside Of The ...
Development

No branches or pull requests

3 participants