yuqi1129 commented on issue #12093: URL: https://github.com/apache/gravitino/issues/12093#issuecomment-5055878616
After discussion in #12120, we've decided to keep the current behavior. This asymmetry is by design rather than a bug: - The `assignments` in the **create response** are simply an echo of the request payload — they represent the *initial* partitions specified at table creation time, and the server does not query Doris to produce them. - The `partitioning` returned by **loadTable** describes the table's static partition *definition* (strategy and field names). Partition assignments are mutable runtime state: they change via `addPartition()`/`dropPartition()` or Doris dynamic partitioning, so even the create response's assignments become stale immediately after creation. - Populating `assignments` on every loadTable would require an extra `SHOW PARTITIONS` (plus column metadata) round trip, and the response would grow linearly with the partition count — easily thousands of entries for tables using dynamic partitioning — penalizing every caller of this high-frequency operation. To read a table's actual partitions, please use the dedicated partition API instead: ```java table.supportPartitions().listPartitions(); // or getPartition(name) ``` Closing as works-as-designed. -- 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]
