qidian99 commented on code in PR #7915: URL: https://github.com/apache/hudi/pull/7915#discussion_r1103953817
########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala: ########## @@ -202,6 +202,13 @@ private[sql] object SchemaConverters { st.foreach { f => val fieldAvroType = toAvroType(f.dataType, f.nullable, f.name, childNameSpace) + val fieldBuilder = fieldsAssembler.name(f.name).`type`(fieldAvroType) Review Comment: ![image](https://user-images.githubusercontent.com/20527912/218361319-2783b730-ddea-4d7b-b7d4-ec225014e531.png) When `extractPartitionValuesFromPartitionPath` is turned on, the StructType schema and AvroSchema differs. convertToAvroSchema is missing the default value when the field is nullable, making the table not queryable. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org