unikdahal opened a new issue, #6576: URL: https://github.com/apache/datafusion-comet/issues/6576
### Describe the bug While working on native Iceberg merge-on-read support, I found that Comet's Arrow struct writer assumes the Spark struct width matches the Arrow struct width. Spark columnar structs can expose the full backing `StructType` even when Comet is writing a narrower projected Arrow struct. `StructWriter` currently iterates over `struct.numFields`, which can make it walk past the Arrow children. This is relevant for MOR paths where Iceberg metadata such as partition structs can retain a wider backing shape across projections or partition-spec evolution. ### Steps to reproduce _No response_ ### Expected behavior Arrow struct writes should be driven by the declared Arrow schema. A top-level columnar struct can safely ignore compatible trailing fields after validating that the leading fields match the Arrow schema. Direct and nested struct writes should continue to require an exact shape. The Spark-to-Arrow path should also initialize declared `StructVector` children when the physical vector has not materialized them yet. ### Additional context _No response_ -- 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]
