suntectec opened a new pull request, #10750: URL: https://github.com/apache/paimon/pull/10750
### Purpose close #10239 In a value-only partition layout (`format-table.partition.only-value-in-path=true`), the write validator `PartitionPathUtils.validatePartitionValueForPath` rejected only null, empty, "." and "..". A partition value such as `_x` or `.tmp` was therefore written to a directory whose name starts with `_` or `.`. The read path, however, treats any value-only directory whose name starts with `_` or `.` as a hidden staging/metadata directory (`isHiddenFile` / `isHiddenName`) and skips it, exempting only the configured default partition name. Because the write and read sides disagreed, the `_x` partition and all of its data silently disappeared from every scan, with no error at write or read time. This PR turns that silent data loss into a loud write-time failure: every value-only partition value is validated against the same `isHiddenName` predicate the scan uses, while the default partition name that scans un-hide stays allowed. The check is applied at the two write-time entry points that build the physical directory layout (`FormatTableFileWriter` and `FormatTableCommit`); read paths are left unchanged so no legitimate default partition is rejected. ### Tests - `FormatTableValueOnlyHiddenPartitionTest`: end-to-end through the format-table write API — writing `_x` / `.tmp` / `__hidden` now throws; a visible value and the default partition name (which also starts with `_`) still write fine. - `PartitionPathUtilsTest`: unit coverage — hidden value-only values rejected, default name allowed, key=value layout unaffected, visible values accepted. - Existing `FormatTableCommitTest` and `FormatTableScanTest` pass unchanged, so no regression on default-partition handling. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
