SourabhBadhya commented on code in PR #5789: URL: https://github.com/apache/hive/pull/5789#discussion_r2080013775
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -921,7 +921,8 @@ public DynamicPartitionCtx createDPContext( List<Function<List<ExprNodeDesc>, ExprNodeDesc>> customSortExprs = Lists.newLinkedList(); dpCtx.setCustomSortExpressions(customSortExprs); - if (table.spec().isPartitioned()) { + if (table.spec().isPartitioned() && + hiveConf.getIntVar(ConfVars.HIVE_OPT_SORT_DYNAMIC_PARTITION_THRESHOLD) == 1) { Review Comment: @deniskuzZ Makes sense. This is a static solution however, there could be places wherein we can allow using FanoutWriters dynamically. Consider this case - Inserting into / overwrite a single partition / finite low number of partitions. (We can do this now) Anyways I am completely fine with this approach. Just want to highlight a possible optimization which can be done in some scenarios. Let me know if I am wrong in this optimization and also does it make sense to do this specifically. -- 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-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org