Skip to content

[core] Fix partitioned Format Table scans with file:/// URIs - #1589

Open
JaydenHD wants to merge 1 commit into
apache:mainfrom
JaydenHD:fix-file-uri
Open

JaydenHD wants to merge 1 commit into
apache:mainfrom
JaydenHD:fix-file-uri

Conversation

@JaydenHD

@JaydenHD JaydenHD commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Purpose

Full scans of partitioned Format Tables can silently return no rows when the table location is file:///.... Local file listings return file:/..., so the scan fails to derive the partition path and skips the listed files.

Brief change log

  • Treat file:/ and file:/// as equivalent when both paths are absolute local file URIs without an authority. Leave the path used to open each file unchanged.
  • Require a directory boundary when matching the table path so a sibling directory with the same prefix is not treated as part of the table.

Tests

  • The Parquet regression reads the same partitioned table through a plain absolute path, file:/..., and file:///.... The last form returned no rows before the fix. All three now return the expected two rows.
  • The directory-boundary test rejects a sibling directory, a file URI with an authority, and a different storage scheme.
  • cargo test --locked -p paimon --lib format_table passed all 80 tests.
  • cargo test --locked -p paimon --lib finished with 5,206 passed and 8 ignored.
  • cargo fmt --all -- --check and git diff --check passed.

API and Format

No public API or storage format changes.

Documentation

No documentation changes.

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.

1 participant