unikdahal opened a new pull request, #6578: URL: https://github.com/apache/datafusion-comet/pull/6578
## Which issue does this PR close? Closes #6576 . ## Rationale for this change Spark columnar structs can expose more fields than the Arrow struct being written. This surfaced while validating the Spark-to-Arrow path needed for native Iceberg merge-on-read, particularly around projected partition metadata. The Arrow schema should define the output shape rather than the backing Spark struct width. ## What changes are included in this PR? - Validate the leading Spark struct fields against the declared Arrow struct before allowing trailing fields. - Write only fields declared by the Arrow schema. - Keep direct and nested struct writes exact-width. - Initialize missing top-level `StructVector` children from the declared Arrow schema. ## How are these changes tested? Added coverage for wider compatible projections, incompatible and narrower structs, recursive nested mismatches, direct and nested exact-width writes, repeated columnar-reader batches, Arrow-normalized Spark types, and uninitialized struct children. -- 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]
