deniskuzZ commented on code in PR #5789:
URL: https://github.com/apache/hive/pull/5789#discussion_r2079881818
##########
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:
To add sort by partitions expressions only when
`HIVE_OPT_SORT_DYNAMIC_PARTITION_THRESHOLD` optimization is enabled (i.e >= 0).
When it's disabled, we don't expect/need input to be sorted and can use
FanoutWriter
##########
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:
To add sort by partition expressions only when
`HIVE_OPT_SORT_DYNAMIC_PARTITION_THRESHOLD` optimization is enabled (i.e >= 0).
When it's disabled, we don't expect/need input to be sorted and can use
FanoutWriter
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]