Skip to content

[common] Delegate listFilesIterative through the remaining FileIO wrappers - #9865

Merged
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/common-delegate-list-files-iterative-wrappers
Sep 17, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/common-delegate-list-files-iterative-wrappers

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #9862

  • PluginFileIO, ResolvingFileIO and CachingFileIO do not forward listFilesIterative, so the FileIO interface default runs on the wrapper and hides the inner object-store override (HadoopCompliantFileIO in s3/oss/obs/jindo).
  • On an object table with D sub-prefixes, ObjectTableImpl refresh then issues D+1 listStatus calls and materializes each directory instead of one flat paginated listing.
  • Forward the call in each wrapper, following its existing idiom; matches [fs] Delegate listFilesIterative through RESTTokenFileIO #9071 (RESTTokenFileIO) and [fs] Delegate tryToWriteAtomic through FileIO wrappers #9034 (same three wrappers, tryToWriteAtomic).

Tests

  • Added PluginFileIOTest#testListFilesIterativeReachesPluginOverride (also asserts the plugin classloader), ResolvingFileIOTest#testListFilesIterativeReachesResolvedOverride, CachingFileIOTest#testListFilesIterativeReachesDelegateOverride: the delegate's iterator is returned as-is and listStatus is never called. Each fails when only its wrapper's fix is reverted.
  • mvn -pl paimon-common clean install (JDK 11): BUILD SUCCESS, 0 failures (checkstyle, spotless, enforcer included); the four wrapper test classes 49/49.

…ppers

The three wrappers did not forward listFilesIterative, so the interface default
ran on the wrapper and listed each directory with listStatus instead of using the
inner object-store FileIO's flat paginated listing. Forward it like apache#9071 did for
RESTTokenFileIO and apache#9034 did for tryToWriteAtomic, with a mock test per wrapper.

Generated-by: Claude Code
@JingsongLi

Copy link
Copy Markdown
Contributor

Straightforward consistency fix. Scope is complete: PluginFileIO, ResolvingFileIO and CachingFileIO are the remaining FileIO implementations that resolve to a delegate (RESTTokenFileIO already overrides listFilesIterative for the same reason, and LocalFileIO/HadoopFileIO/FlinkFileIO hold no delegate). Per-wrapper tests asserting the delegate's override is reached are the right shape.

@JingsongLi
JingsongLi merged commit bbf2fee into apache:master Sep 17, 2026
18 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.

[Bug] PluginFileIO, ResolvingFileIO and CachingFileIO do not forward listFilesIterative

2 participants