thswlsqls opened a new issue, #10400: URL: https://github.com/apache/paimon/issues/10400
**Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ b0af45681 **Compute Engine** Flink (verified with Flink 1.20.1) **Minimal reproduce step** 1. Hive catalog, table `PARTITIONED BY (dt, hh)` (STRING keys) with `'metastore.partitioned-table' = 'true'`. 2. Run `ALTER TABLE t DROP PARTITION (hh='h1', dt='d1')` or `ALTER TABLE t ADD PARTITION (hh='h9', dt='d9')`. Flink passes the spec in the typed order. `HiveCatalog.createPartitionsUtil()` builds HMS values and the location from `partitionSpec.values()`, and `HiveCatalog.dropPartitions()` builds them from `part.values()`. HMS matches values to keys by position. `alterPartitions()` already orders values by `partitionKeys()`. **What doesn't meet your expectations?** - DROP: if `dt=h1/hh=d1` exists in HMS, that partition is dropped although its data remains, and `dt=d1/hh=h1` stays. Otherwise the missing-partition error is swallowed and `dt=d1/hh=h1` stays stale. Paimon's own data drop is correct. - ADD: HMS registers values `[h9, d9]` with location `.../hh=h9/dt=d9`. **Anything else?** Spark SQL, commit callbacks, partition expiration, mark-done, single-key tables and tag-to-partition already pass specs in key order and are unaffected. **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]
