pramodbiligiri commented on code in PR #7864:
URL: https://github.com/apache/hudi/pull/7864#discussion_r1100984391


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala:
##########
@@ -241,7 +241,12 @@ object DefaultSource {
     }
 
     if (metaClient.getCommitsTimeline.filterCompletedInstants.countInstants() 
== 0) {
-      new EmptyRelation(sqlContext, resolveSchema(metaClient, parameters, 
Some(schema)))
+      val structType = resolveSchema(metaClient, parameters, Some(schema))

Review Comment:
   Since this seems to happen on an empty table with no completed commits, 
shall we keep this as a valid Hudi issue then? (The scope of my current task 
was only to validate if it's a valid issue). I can imagine situations like this 
where people will be querying a table before it is populated. I think it ought 
to return empty rows and not throw an NPE. What do you think?



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