You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "difin (via GitHub)" <gi...@apache.org> on 2025/02/13 17:39:15 UTC

Re: [PR] Iceberg: Add support for FILE_SIZE_THRESHOLD to compaction commandFile size threshold [hive]

difin commented on code in PR #5540:
URL: https://github.com/apache/hive/pull/5540#discussion_r1954945602


##########
common/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java:
##########
@@ -493,6 +493,7 @@ public enum ErrorMsg {
   ICEBERG_COMPACTION_WITH_PART_SPEC_AND_FILTER_NOT_SUPPORTED(10441, "Compaction command with both partition spec and filter is not supported on Iceberg table {0}.{1}", true),
   COMPACTION_THREAD_INITIALIZATION(10442, "Compaction thread failed during initialization", false),
   ALTER_TABLE_COMPACTION_NON_PARTITIONED_COLUMN_NOT_ALLOWED(10443, "Filter expression can contain only partition columns."),
+  UNSUPPORTED_COMPACTION_REQUEST_WITH_FILE_SIZE_THRESHOLD(10444, "File size threshold is supported only with major and minor compaction for Iceberg tables"),

Review Comment:
   Done



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -105,6 +107,13 @@ else if (desc.getPartitionSpec() != null) {
       compactionRequest.setNumberOfBuckets(desc.getNumberOfBuckets());
     }
 
+    if (desc.getFileSizeThreshold() != null) {
+      if (!DDLUtils.isIcebergTable(table) || compactionRequest.getType() != CompactionType.MINOR) {
+        throw new HiveException(ErrorMsg.UNSUPPORTED_COMPACTION_REQUEST_WITH_FILE_SIZE_THRESHOLD);

Review Comment:
   Done



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org