aokolnychyi commented on a change in pull request #3461:
URL: https://github.com/apache/iceberg/pull/3461#discussion_r745156251



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkWriteBuilder.java
##########
@@ -112,42 +136,74 @@ public BatchWrite buildForBatch() {
     // Get application id
     String appId = spark.sparkContext().applicationId();
 
-    SparkWrite write = new SparkWrite(spark, table, writeConf, writeInfo, 
appId, writeSchema, dsSchema);
-    if (overwriteByFilter) {
-      return write.asOverwriteByFilter(overwriteExpr);
-    } else if (overwriteDynamic) {
-      return write.asDynamicOverwrite();
-    } else if (overwriteFiles) {
-      return write.asCopyOnWriteMergeWrite(mergeScan, isolationLevel);
+    Distribution distribution;
+    SortOrder[] ordering;
+
+    if (requestDistributionAndOrdering) {
+      distribution = buildRequiredDistribution();
+      ordering = buildRequiredOrdering(distribution);
     } else {
-      return write.asBatchAppend();
+      LOG.warn("Can't request distribution/ordering as extensions are disabled 
and spec has non-identity transforms");

Review comment:
       Slightly adapted the error message to stay on 1 line.




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

Reply via email to