pvary commented on code in PR #12298:
URL: https://github.com/apache/iceberg/pull/12298#discussion_r2519141900


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkFileWriterFactory.java:
##########
@@ -340,4 +346,14 @@ SparkFileWriterFactory build() {
           writeProperties);
     }
   }
+
+  private static StructType calculateSparkType(StructType sparkType, Schema 
schema) {
+    if (sparkType != null) {
+      return sparkType;
+    } else if (schema != null) {
+      return SparkSchemaUtil.convert(schema);
+    } else {
+      return null;

Review Comment:
   Ahh.. the tests failed with this PR, and I fixed by this at that time: 
https://github.com/apache/iceberg/commit/df3d7c47d4221d008bc2f7db5c55e056627ad9a4
   
   Basically the `Preconditions` are moved into 
`RegistryBasedFileWriterFactory.newDataWriter` and 
`RegistryBasedFileWriterFactory.newEqualityDeleteWriter`.
   
   This new precondition checks are already part of this PR, so I have reverted 
the previous change from `9e9ccac`



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