Repository navigation
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
|
@VaibhaveS Thanks for this! Overall idea seems reasonable; can you take a look at the test failure, please? |
|
I ran into this issue today as well, and would love to see this fixed. @VaibhaveS do you need any help sorting out the test failure? |
|
I've merged in |
|
@pepijnve @VaibhaveS Looks like the failing test needs to be addressed, as well as a merge conflict. |
|
@neilconway since I don't have permission to merge my suggestions into this PR, shall I go ahead and create a new one? |
|
@pepijnve Yep, let's do that. Thanks! |
|
I've made a new draft PR. Merge of |
…e#25887) ## Which issue does this PR close? - Closes apache#15960. - Supersedes / closes apache#24200. - Prerequisite for PR apache#26057. ## Rationale for this change Catalog-qualified information schema queries currently return metadata for object from every registered catalog. If we follow the letter of the SQL specification, `my_catalog.information_schema.tables` should describe only `my_catalog`. This is consistent with PostgreSQL's information schema representing the current database. When working with multiple catalogs, for instance multiple Iceberg REST catalogs, it is more practical to be able to query just the objects defined in one specific catalog without further filtering. A special 'system' catalog is optionally provided to be able to query across catalogs. This can be seen as an approximation of SQL's definition schema. ## What changes are included in this PR? - The catalog list provided to `InformationSchemaProvider` is now constructed dynamically based on the catalog being queried. An optional 'system' catalog provides the existing global catalog behaviour. All other catalogs are restricted to just their own content. - Unqualified information_schema queries now use the configured default catalog instead of returning metadata from all catalogs. ## What is the testing strategy for this PR? Added multi-catalog SQL logic coverage for qualified and unqualified information schema queries. ## Are there any user-facing changes? Yes. Information schema results are now scoped to the resolved catalog. --------- Co-authored-by: Vaibhave Sekar <[email protected]> Co-authored-by: Andrew Lamb <[email protected]>
Which issue does this PR close?
Rationale for this change
Catalog-qualified information schema queries currently return metadata from every registered catalog.
For example,
my_catalog.information_schema.tablesshould describe onlymy_catalog, consistent with PostgreSQL's information schema representing the current database.What changes are included in this PR?
InformationSchemaProvidernow receives one resolved catalog directly. Tables, columns, views, and schemas are enumerated only from that catalog.Unqualified
information_schemaqueries now use the configured default catalog instead of returning metadata from all catalogs.Are these changes tested?
Yes. Added multi-catalog SQL logic coverage for qualified and unqualified information schema queries.
Are there any user-facing changes?
Yes. Information schema results are now scoped to the resolved catalog.
The
InformationSchemaProvider::newsignature now accepts a catalog name andCatalogProvider.