Skip to content

fix: scope information schema to catalog - #24200

Open
VaibhaveS wants to merge 1 commit into
apache:mainfrom
VaibhaveS:vsekar/information-schema-catalog
Open

fix: scope information schema to catalog#24200
VaibhaveS wants to merge 1 commit into
apache:mainfrom
VaibhaveS:vsekar/information-schema-catalog

Conversation

@VaibhaveS

Copy link
Copy Markdown

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.tables should describe only my_catalog, consistent with PostgreSQL's information schema representing the current database.

What changes are included in this PR?

InformationSchemaProvider now receives one resolved catalog directly. Tables, columns, views, and schemas are enumerated only from that catalog.

Unqualified information_schema queries 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::new signature now accepts a catalog name and CatalogProvider.

@github-actions github-actions Bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) catalog Related to the catalog crate labels Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

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
     Cloning apache/main
    Building datafusion v54.1.0 (current)
       Built [ 110.761s] (current)
     Parsing datafusion v54.1.0 (current)
      Parsed [   0.035s] (current)
    Building datafusion v54.1.0 (baseline)
       Built [ 104.799s] (baseline)
     Parsing datafusion v54.1.0 (baseline)
      Parsed [   0.033s] (baseline)
    Checking datafusion v54.1.0 -> v54.1.0 (no change; assume patch)
     Checked [   0.640s] 223 checks: 223 pass, 30 skip
     Summary no semver update required
    Finished [ 218.496s] datafusion
    Building datafusion-catalog v54.1.0 (current)
       Built [  41.121s] (current)
     Parsing datafusion-catalog v54.1.0 (current)
      Parsed [   0.024s] (current)
    Building datafusion-catalog v54.1.0 (baseline)
       Built [  41.309s] (baseline)
     Parsing datafusion-catalog v54.1.0 (baseline)
      Parsed [   0.025s] (baseline)
    Checking datafusion-catalog v54.1.0 -> v54.1.0 (no change; assume patch)
     Checked [   0.113s] 223 checks: 222 pass, 1 fail, 0 warn, 30 skip

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/method_parameter_count_changed.ron

Failed in:
  datafusion_catalog::information_schema::InformationSchemaProvider::new takes 1 parameters in /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/242f5b767bccc2195a4a966fa823c972c4956fca/datafusion/catalog/src/information_schema.rs:83, but now takes 2 parameters in /home/runner/work/datafusion/datafusion/datafusion/catalog/src/information_schema.rs:83

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  83.837s] datafusion-catalog
    Building datafusion-sqllogictest v54.1.0 (current)
       Built [ 185.572s] (current)
     Parsing datafusion-sqllogictest v54.1.0 (current)
      Parsed [   0.022s] (current)
    Building datafusion-sqllogictest v54.1.0 (baseline)
       Built [ 181.709s] (baseline)
     Parsing datafusion-sqllogictest v54.1.0 (baseline)
      Parsed [   0.023s] (baseline)
    Checking datafusion-sqllogictest v54.1.0 -> v54.1.0 (no change; assume patch)
     Checked [   0.091s] 223 checks: 223 pass, 30 skip
     Summary no semver update required
    Finished [ 370.288s] datafusion-sqllogictest

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto detected api change Auto detected API change catalog Related to the catalog crate core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

information_schema.tables contains all tables from all catalogs instead of current catalog

1 participant