flyrain commented on code in PR #945:
URL: https://github.com/apache/polaris/pull/945#discussion_r1943602094
##########
polaris-core/src/main/resources/schemas/policies/system/data-compaction/2025-02-03.json:
##########
@@ -0,0 +1,41 @@
+{
+ "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/data-compaction/2025-02-03.json",
+ "title": "Data Compaction Policy",
+ "description": "Inheritable Polaris policy schema for Iceberg table data
compaction.",
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "string",
+ "const": "2025-02-03",
+ "description": "Schema version."
+ },
+ "enable": {
+ "type": "boolean",
+ "description": "Enable or disable data compaction."
+ },
+ "target_file_size_bytes": {
Review Comment:
The `target_file_size_bytes` in the policy will be used exclusively for TMS
(Table Maintenance System) or similar applications, and I believe it's
reasonable to keep it as is.
1. It's optional—TMS or users can ignore it if they prefer table properties
instead.
2. It has been in place for a while. For example, [Iceberg's Spark rewrite
procedure](https://iceberg.apache.org/docs/nightly/spark-procedures/#rewrite_data_files)
could use a different `target_file_size_bytes`.
That said, moving it to the `config` map is also a viable option. However,
the main drawback would be losing interoperability. I'm also looking forward to
others' thoughts.
--
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]