gudladona commented on issue #6611:
URL: https://github.com/apache/hudi/issues/6611#issuecomment-1277546322

   We encountered this issue as well, we think this is due to the 
SparkAvroPostProcessor ignoring the default values from the passed target 
schema 
[here](https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala#L154)
 - when converting from struct type to avro type for primitive types this 
function sets no default (ignored from the source)  
[here](https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala#L205).
 And 
[here](https://github.com/apache/hudi/blob/master/hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/AvroConversionUtils.scala#L192)
 this function does not set the defaults by type, rather gets the default for 
the field that was assumed to be set upstream. 


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

Reply via email to