Skip to content

SHOW TABLES loads full table providers #575

Description

@shyjsarah

Search before asking

  • I searched the existing issues and found nothing similar.

Please describe the bug

In the DataFusion integration, SHOW TABLES is evaluated through information_schema.tables. DataFusion asks each schema provider for the type of every listed table. The default SchemaProvider::table_type implementation calls table(name), which makes the Paimon schema provider load the full table provider and initialize its FileIO.

As a result, metadata listing can fail when a catalog can list a table but the table's storage is not accessible from the current client. SHOW TABLES should only require catalog metadata; an actual query against that table should continue to load the provider and report any storage error.

A minimal reproduction is a catalog implementation where:

  • list_tables("default") returns metadata_only
  • get_table(...) returns an error indicating that table loading is unavailable
  • executing SHOW TABLES currently propagates that error

Expected behavior: SHOW TABLES lists metadata_only without calling get_table.

Solution

Override PaimonSchemaProvider::table_type and reuse table/view types collected by table_names. Temporary objects should retain their provider-reported type, catalog views should remain VIEW, and direct table reads should keep the existing lazy-loading behavior.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions