Repository navigation
[core] Do not hide the escaped default partition directory in the value-only layout - #11173
Merged
JingsongLi merged 1 commit intoNov 29, 2026
Conversation
plusplusjiajia
force-pushed
the
fix/core-escaped-default-partition-not-hidden
branch
2 times, most recently
from
November 16, 2026 01:39
0ecc2d5 to
1ee20f4
Compare
plusplusjiajia
marked this pull request as ready for review
November 23, 2026 10:22
…ue-only layout With format-table.partition-path-only-value=true, scans hide directories whose names start with '_' or '.', except for the default partition. isHiddenFile recognized it by comparing the raw partition.default-name with the directory name, but the writer escapes the default name like every value, so a default name that escaping changes, such as __NULL/VALUE__ written to __NULL%2FVALUE__, was skipped as hidden and the rows of the null partition were not read. The cleanup of an INSERT OVERWRITE or TRUNCATE of a partition prefix made the same comparison in FormatTableScan.listDataFiles and kept that directory's files. Both now compare the directory name with the escaped default name, from PartitionPathUtils.defaultPartitionDirName. An empty default name names no directory, so no directory is exempted for it, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plusplusjiajia
force-pushed
the
fix/core-escaped-default-partition-not-hidden
branch
from
November 27, 2026 11:00
1ee20f4 to
f39db07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
With
format-table.partition-path-only-value=true, a partition directory whose name starts with_or.is hidden from scans, except for the default partition.PartitionPathUtils.isHiddenFilerecognized the default partition by comparing the rawpartition.default-namewith the directory name. The writer escapes every value, the default name included, so a default name that escaping changes names a different directory:__NULL/VALUE__is written to__NULL%2FVALUE__, which the scan then skipped as hidden, and the rows of the null partition were not read. The cleanup of anINSERT OVERWRITEorTRUNCATEof a partition prefix made the same comparison inFormatTableScan.listDataFiles, so it kept that directory's files and the old rows stayed visible.Both now compare the directory name with the escaped default name, from
PartitionPathUtils.defaultPartitionDirName. Other directories that start with_or.are still hidden. An empty default name names no directory, so no directory is exempted for it, as before.Found while reviewing #11018, where PyPaimon reads such directories.
Tests
PartitionPathUtilsTest#testValueOnlyEscapedDefaultPartitionIsListed: with the default name__NULL/VALUE__, the escaped default partition directory and a normal value are listed, and a_hiddendirectory is skipped.PartitionPathUtilsTest#testValueOnlyEmptyDefaultPartitionNameNamesNoDirectory: with an empty default name, the other partitions are listed and_hiddenis skipped.FormatTableCommitTest#testOverwritingAPrefixClearsTheDefaultPartitionDirectorynow also runs with__NULL/VALUE__: overwriting a prefix clears2025/__NULL%2FVALUE__.PartitionPathUtilsTest(27) andFormatTableCommitTest(74) pass; the new cases fail without the change.🤖 Generated with Claude Code