LuciferYang opened a new issue, #11027: URL: https://github.com/apache/paimon/issues/11027
### Search before asking - [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. ### Paimon version master (b000c3945f) ### Compute Engine Python ### Minimal reproduce step ```python schema = Schema.from_pyarrow_schema( pa.schema([('id', pa.int32()), ('dt', pa.string())]), partition_keys=['dtt']) catalog.create_table('default.t', schema, False) # succeeds catalog.get_table('default.t') # KeyError: 'dtt' catalog.drop_table('default.t', True) # KeyError: 'dtt' ``` ### What doesn't meet your expectations? `create_table` should reject a partition or primary key that is not a column, as Java's `Schema` does ("Table column [id, dt] should include all partition fields [dtt]"). Instead PyPaimon writes `schema-0`, and the table can then neither be loaded nor dropped: `drop_table` loads the table first, and creating it again with the right key fails the same way. The directory has to be deleted by hand. `create_table` also accepts duplicate column names and duplicate partition or primary keys, which Java's `Schema` rejects. A table with duplicate column names is persisted and loads, but writes to it fail. ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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]
