Skip to content

fix(catalog): align FileSystemCatalog with Java for object store comp…#532

Open
mlboy wants to merge 5 commits into
apache:mainfrom
mlboy:main
Open

fix(catalog): align FileSystemCatalog with Java for object store comp…#532
mlboy wants to merge 5 commits into
apache:mainfrom
mlboy:main

Conversation

@mlboy

@mlboy mlboy commented Jul 16, 2026

Copy link
Copy Markdown

…atibility

  • database_exists: append trailing slash so OpenDAL correctly identifies directory paths on OSS/S3 (Hadoop does this via getFileStatus fallback)
  • table_exists: check schema file presence instead of bare directory existence, mirroring Java's AbstractCatalog.tableExistsInFileSystem
  • list_tables: filter directories by schema validity and sort results, matching Java's listTablesInFileSystem behavior

Purpose

Linked issue: close #xxx

Brief change log

Tests

API and Format

Documentation

…atibility

- database_exists: append trailing slash so OpenDAL correctly identifies
  directory paths on OSS/S3 (Hadoop does this via getFileStatus fallback)
- table_exists: check schema file presence instead of bare directory
  existence, mirroring Java's AbstractCatalog.tableExistsInFileSystem
- list_tables: filter directories by schema validity and sort results,
  matching Java's listTablesInFileSystem behavior
Comment thread crates/paimon/src/catalog/filesystem.rs Outdated
mlboy added 2 commits July 17, 2026 14:56
… errors

The previous `Err(_) => Ok(false)` swallowed all list_all_ids errors
including permission denied and transient storage failures, which could
cause create_table to overwrite an existing table's schema.

Now only opendal::ErrorKind::NotFound (schema directory missing) maps
to Ok(false). All other errors propagate to the caller.
The exact pin =1.13.2 was for upstream Vortex CI stability but
conflicts with datafusion 53.x which resolves to 1.13.3.
@mlboy
mlboy requested a review from QuakeWang July 17, 2026 08:47
The fix should be applied downstream in lakeserve instead.
Comment thread crates/paimon/src/catalog/filesystem.rs
Cover the previously unverified behaviors:
- schema fallback when schema-0 is absent but schema-N exists
- markerless directory (no schema/ subdir) returns false
- empty schema directory returns false
- list_tables filters out invalid directories
- non-NotFound errors (e.g. permission denied) are propagated
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.

2 participants