Skip to content

fix(datafusion): avoid loading tables for SHOW TABLES#576

Merged
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/show-tables-without-table-load
Jul 21, 2026
Merged

fix(datafusion): avoid loading tables for SHOW TABLES#576
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/show-tables-without-table-load

Conversation

@shyjsarah

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #575

SHOW TABLES should use catalog metadata without opening every listed table. The default DataFusion SchemaProvider::table_type implementation calls table(name), which can initialize FileIO and turn a metadata-only operation into a table access.

Brief change log

  • collect base-table and view types while listing catalog objects
  • override PaimonSchemaProvider::table_type to use the collected metadata instead of loading table providers
  • preserve temporary table/view precedence and catalog view classification
  • keep direct table reads on the existing lazy-loading path
  • add regression coverage for unavailable table loading and catalog view types

Tests

  • cargo fmt --all -- --check
  • cargo test -p paimon-datafusion --test sql_context_tests
  • cargo clippy -p paimon-datafusion --all-targets -- -D warnings

API and Format

No public API or storage format changes.

Documentation

No documentation changes are required.

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi
JingsongLi merged commit 856d417 into apache:main Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SHOW TABLES loads full table providers

2 participants