gurukaraje commented on code in PR #969:
URL: https://github.com/apache/polaris/pull/969#discussion_r1949775577


##########
polaris-core/src/main/resources/schemas/policies/system/orphan-file-removal/2025-02-03.json:
##########
@@ -0,0 +1,47 @@
+{
+  "license": "Licensed under the Apache License, Version 2.0 
(http://www.apache.org/licenses/LICENSE-2.0)",
+  "$id": 
"https://polaris.apache.org/schemas/policies/system/orphan-file-removal/2025-02-03.json";,
+  "title": "Orphan File Removal Policy",
+  "description": "Inheritable Polaris policy schema for Iceberg table orphan 
file removal.",
+  "type": "object",
+  "properties": {
+    "version": {
+      "type": "string",
+      "const": "2025-02-03",
+      "description": "Schema version."
+    },
+    "enable": {
+      "type": "boolean",
+      "description": "Enable or disable orphan file removal."
+    },
+    "older_than": {
+      "type": "number",
+      "description": "A Unix timestamp. Remove orphan files created before 
this timestamp."
+    },
+    "location": {
+      "type": "string",
+      "description": "Customized directory other than table location to look 
for files in."
+    },
+    "config": {
+      "type": "object",
+      "description": "A map containing custom configuration properties. Please 
note that interoperability is not guaranteed.",
+      "additionalProperties": {
+        "type": ["string", "number", "boolean"]
+      }
+    }
+  },
+  "required": ["enable"],
+  "additionalProperties": false,
+  "examples": [
+    {
+      "version": "2025-02-03",
+      "enable": true,
+      "older_than": 1707315296,

Review Comment:
   how about keeping all the 3 policies consistent with the format? metadata 
compaction and snapshot-expiry seem to follow the format:
   ```
   "enable": true
   "config" : {
      "key1" : value1
      "key2" : value2
   }
   ```
   But orphan file deletion has some of the properties `older_than` and 
`location` out side of config:
   ```
   "enable": true,
   "older_than": 1707315296,
   "location": "s3://my-bucket/my-table-location",
   "config": {
      "prefix_mismatch_mode": "ignore",
      "my_key": "my_value"
   }
   ```



-- 
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]

Reply via email to