You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/09 19:25:47 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #5392: Spark: Fix a separate table cache being created for each rewriteFiles

kbendick commented on code in PR #5392:
URL: https://github.com/apache/iceberg/pull/5392#discussion_r941724072


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
##########
@@ -489,7 +490,10 @@ private String jobDesc(RewriteFileGroup group, RewriteExecutionContext ctx) {
   }
 
   private BinPackStrategy binPackStrategy() {
-    return new SparkBinPackStrategy(table, spark());
+    // Disable Adaptive Query Execution as this may change the output partitioning of our write
+    SparkSession spark = spark().cloneSession();
+    spark.conf().set(SQLConf.ADAPTIVE_EXECUTION_ENABLED().key(), false);
+    return new SparkBinPackStrategy(table, spark);

Review Comment:
   Given that `spark()` is protected in `BaseSparkAction`, it could be overridden within this action.
   
   Or another `spark()` method could be added that clones and disables AQE, like `spark(boolean cloneAndDisableAQE)` or something.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org