thswlsqls opened a new pull request, #10401: URL: https://github.com/apache/paimon/pull/10401
### Purpose fix #10400 - HMS matches partition values to partition keys by position, but `HiveCatalog` built them from the input spec's iteration order when adding (values and location) and dropping partitions. - With `metastore.partitioned-table=true` and two or more keys, Flink SQL `ADD/DROP PARTITION` with keys out of declared order registered a wrong partition, or dropped another partition (data intact) and left the intended one stale. - Reorder the spec by the partition keys when its key set matches them; other specs are unchanged. This matches `alterPartitions()`. ### Tests - Added `HiveCatalogTest#testCreateAndDropPartitionsWithSpecNotInPartitionKeyOrder`: a reversed-order drop removes only the intended HMS partition and keeps its mirror; a reversed-order create registers values and location in key order. Both assertions fail without the fix. - `mvn -pl paimon-hive/paimon-hive-catalog clean install` (JDK 11): 83 tests passed, including `HiveCatalogTest` 57/57. -- 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]
