openinx commented on a change in pull request #1213:
URL: https://github.com/apache/iceberg/pull/1213#discussion_r460637387



##########
File path: 
spark/src/main/java/org/apache/iceberg/spark/source/RowDataRewriter.java
##########
@@ -92,16 +96,17 @@ private TaskResult rewriteDataForTask(CombinedScanTask 
task) throws Exception {
     RowDataReader dataReader = new RowDataReader(
         task, schema, schema, nameMapping, io.value(), 
encryptionManager.value(), caseSensitive);
 
-    SparkAppenderFactory appenderFactory = new SparkAppenderFactory(
-        properties, schema, SparkSchemaUtil.convert(schema));
+    StructType structType = SparkSchemaUtil.convert(schema);
+    SparkAppenderFactory appenderFactory = new 
SparkAppenderFactory(properties, schema, structType);

Review comment:
       I changed this because the `SparkPartitionedWriter`  will need the 
spark's `StructType` to decide how to partition, so I move the `StructType 
structType = SparkSchemaUtil.convert(schema);`  into a separate 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.

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