laserninja commented on code in PR #13531:
URL: https://github.com/apache/gravitino/pull/13531#discussion_r4147360012
##########
maintenance/optimizer/src/main/java/org/apache/gravitino/maintenance/optimizer/recommender/handler/BaseExpressionStrategyHandler.java:
##########
@@ -127,7 +127,8 @@ private int maxPartitionNum() {
}
private boolean isPartitionTable() {
- return tableMetadata.partitioning().length > 0;
+ return dataRequirements().contains(DataRequirement.PARTITION_STATISTICS)
Review Comment:
Fixed in 782715170. Added a comment explaining that partition evaluation
requires PARTITION_STATISTICS, while table-level strategies such as orphan
cleanup must also work on partitioned tables without partition statistics.
##########
docs/open-api/policies.yaml:
##########
@@ -417,10 +454,12 @@ components:
description: A basic policy without content
oneOf:
- $ref: '#/components/schemas/CustomPolicy'
+ - $ref: '#/components/schemas/IcebergOrphanFileRemovalPolicy'
discriminator:
propertyName: policyType
mapping:
custom: '#/components/schemas/CustomPolicy'
+ system_iceberg_orphan_file_removal:
'#/components/schemas/IcebergOrphanFileRemovalPolicy'
Review Comment:
Fixed in 782715170. Added compaction content and policy/create/update
schemas with discriminator mappings matching Java. The update discriminator now
uses the sibling policyType field, matching the request format. OpenAPI
validation and create/update schema checks for both built-in types passed.
--
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]