You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/01/05 13:12:10 UTC

[GitHub] [hudi] vinishjail97 commented on a change in pull request #4509: [HUDI-3168] Fixing null schema with empty commit in incremental relation

vinishjail97 commented on a change in pull request #4509:
URL: https://github.com/apache/hudi/pull/4509#discussion_r778806599



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
##########
@@ -89,8 +89,13 @@ class IncrementalRelation(val sqlContext: SQLContext,
     } else {
       schemaResolver.getTableAvroSchemaWithoutMetadataFields()
     }
-    val dataSchema = AvroConversionUtils.convertAvroSchemaToStructType(tableSchema)
-    StructType(skeletonSchema.fields ++ dataSchema.fields)
+    if (tableSchema == null) {

Review comment:
       `tableSchema.getType == Schema.Type.NULL` is the expected boolean expression for checking AVRO schema is null. 




-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org