lasdf1234 opened a new issue, #13726:
URL: https://github.com/apache/gravitino/issues/13726
### Describe the feature
Allow the built-in `system_iceberg_compaction` policy to configure Iceberg
`rewrite_data_files` top-level `strategy` and `sort_order` (for example `sort`
+ `zorder(c1,c2)`), so the optimizer can submit sort/z-order compaction jobs
instead of always using binpack.
### Motivation
Iceberg treats `strategy` and `sort_order` as procedure parameters, separate
from the `options` map. Today Gravitino only exposes `rewriteOptions` (mapped
to `job.options.*` → Iceberg `options`) and the optimizer adapter hardcodes
`strategy=binpack` with an empty `sort_order`. Users cannot configure sort
compaction through the policy.
### Describe the solution
1. Add typed policy fields `rewriteStrategy` and `sortOrder` on
`IcebergDataCompactionContent`.
2. Emit them as rules `job.strategy` / `job.sort-order` (not under
`job.options.*`).
3. Propagate through `CompactionJobContext` to
`GravitinoCompactionJobAdapter` template args `strategy` / `sort_order`.
4. Keep `rewriteOptions` as the Iceberg `options` map only.
5. Validate: `rewriteStrategy` in `{binpack, sort}`; require non-empty
`sortOrder` when strategy is `sort`.
### Additional context
Defaults remain compatible: `rewriteStrategy=binpack`, `sortOrder=""`.
--
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]