joyhaldar commented on code in PR #15688:
URL: https://github.com/apache/iceberg/pull/15688#discussion_r2964717651
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/data/SparkAvroWriter.java:
##########
@@ -46,6 +47,10 @@ public SparkAvroWriter(StructType dsSchema) {
this.dsSchema = dsSchema;
}
+ public SparkAvroWriter(org.apache.iceberg.Schema icebergSchema, StructType
engineSchema) {
+ this(engineSchema != null ? engineSchema :
SparkSchemaUtil.convert(icebergSchema));
Review Comment:
Thank you for the review @huaxingao.
I have added two new tests in BaseFormatModelTests that cover the null path
based on your and @pvary's suggestions,
`testDataWriterEngineWriteWithoutEngineSchema` and
`testEqualityDeleteWriterEngineWriteWithoutEngineSchema`. The existing tests
with explicit `engineSchema` are also present.
--
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]