sundapeng opened a new pull request, #9723:
URL: https://github.com/apache/paimon/pull/9723

   ### Purpose
   
   Follow-up to #9710. A catalog may hold a table directory that names no 
scheme, the way a warehouse given as a plain absolute path does. The location a 
request names to return a partition to its default directory then names no 
scheme either, and `canonicalizeLocation` refused it, so 
`isDefaultPartitionPath` did not recognize the directory it had just generated:
   
   ```
   /warehouse/db/table -> /warehouse/db/table/dt=2026 | recognized=false
   file:/warehouse/db/table -> file:/warehouse/db/table/dt=2026 | 
recognized=true
   ```
   
   An overwrite of such a table names its default directory, the server reads 
that as a request for a location of its own, and the request is rejected 
because the location is under the table.
   
   Requiring a scheme is one of the rules for a place a partition may own, next 
to the authority rule, so it moves to `canonicalizeCustomLocation`. A plain 
absolute path stays invalid as a custom location, and is canonicalized as what 
it is when the catalog is the one carrying it.
   
   ### Tests
   
   - `FormatTablePartitionPathResolverTest`: a schemeless table directory 
generates and recognizes its own partition directory, while the same shape 
stays invalid as a custom location; the existing rejection list is unchanged.
   - `FormatTableCommitTest`, `FormatTableCommitEscapedPartitionValueTest`, 
`MockRESTCatalogTest`, `FormatTablePartitionRegistryValidatorTest`, 
`CatalogManagedPartitionScanTest`, `FormatTableCommitStatisticsTest`, 
`FormatTableCommitRegistryValidationTest`, `FormatTablePartitionManagementTest`
   


-- 
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]

Reply via email to