Skip to content

[pvfs] Set working directory to the catalog root in PaimonVirtualFileSystem - #9507

Open
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/pvfs-working-directory-catalog-root
Open

[pvfs] Set working directory to the catalog root in PaimonVirtualFileSystem#9507
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/pvfs-working-directory-catalog-root

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #9506

  • Behavior change, up front: a single-segment relative path such as x.csv succeeds today and throws IOException after this change. That success writes into a table the user never named, and which table is non-deterministic — the Hadoop FileSystem cache key is scheme+authority+ugi.
  • initialize() took workingDirectory from the raw URI Hadoop passes in while normalizing this.uri to scheme://authority/. Reorder so it derives from the normalized catalog root. The self-contradiction dates to [Feature] Implement Paimon Virtual Filesystem #5916.
  • Reached by the documented usage in docs/docs/concepts/rest/pvfs.md lines 61-62.

Tests

  • Added VirtualFileSystemTest#testWorkingDirectoryIsCatalogRoot, inherited by both subclasses: the working directory equals the catalog root, and a relative-path create lands in the table it names.
  • mvn -pl paimon-vfs/paimon-vfs-hadoop clean install — 29 tests pass. No existing test initializes with a path component (MockRestVirtualFileSystemTest L119, MockRestNoCacheVirtualFileSystemTest L47), so the 27 pre-existing tests stay green.

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.

[Bug] PVFS working directory is the raw init URI, not the catalog root

1 participant