lasdf1234 opened a new pull request, #13727:
URL: https://github.com/apache/gravitino/pull/13727
### What changes were proposed in this pull request?
- Add typed policy fields `rewriteStrategy` / `sortOrder` on
`system_iceberg_compaction`
- Emit them as rules `job.strategy` / `job.sort-order` (not under
`job.options.*`)
- Propagate through `CompactionJobContext` → `GravitinoCompactionJobAdapter`
job template args `strategy` / `sort_order`
- Keep `rewriteOptions` as the Iceberg `options` map only
- Update docs and unit tests
### Why are the changes needed?
The optimizer previously hardcoded `strategy=binpack` and empty
`sort_order`. Sort/z-order compaction cannot be configured via `rewriteOptions`
because Iceberg treats those as top-level procedure parameters, separate from
the `options` map.
Fix: #13726
### Does this PR introduce _any_ user-facing change?
Yes:
- New optional content fields: `rewriteStrategy` (default `binpack`),
`sortOrder` (default `""`)
- Validation: `rewriteStrategy` ∈ `{binpack, sort}`; `sortOrder` required
when strategy is `sort`
### How was this patch tested?
```
./gradlew :api:test --tests TestPolicyContents \
:common:test --tests TestPolicyDTO \
:maintenance:optimizer:test \
--tests TestGravitinoCompactionJobAdapter \
--tests TestGravitinoPolicyCompactionStrategy \
-PskipITs -PskipDockerTests=true
```
Made with [Cursor](https://cursor.com)
--
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]