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

   ### Purpose
   
   pypaimon can list and drop partitions but not create them — Catalog has no 
create_partitions. Registering the partitions of a directory written outside 
Paimon (a format table populated by a copy or an external job) therefore has no 
Python API.
   
   Adds it across the three layers, mirroring Java:
   
     - CreatePartitionsRequest / CreatePartitionsResponse DTOs, with the Java 
field names. ignoreIfExists is on the wire here, unlike CreateTagRequest where 
it is client-side.
     - RESTApi.create_partitions POSTs to the existing partitions path and 
returns the response.
     - RESTCatalog.create_partitions maps the four REST errors as Java does: 
NoSuchResource → TableNotExist, Forbidden → TableNoPermission, AlreadyExists → 
IllegalState, BadRequest → IllegalArgument.
     IllegalStateError is new.
   
   No table-type guard, matching Java — only dropPartitions checks, because it 
moves data. An empty spec list returns without issuing a request, so the "diff 
and create what is missing" flow needs no guard of its own.


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