YannByron commented on pull request #2903:
URL: https://github.com/apache/hudi/pull/2903#issuecomment-1017332353


   @nsivabalan 
   you can merge this https://github.com/nsivabalan/hudi/pull/10 into your 
current branch, and re-test.
   
   >> why can't sql-dml layer intercept empty table and take action 
appropriately.
   
   spark-sql also calls the `DefaultSource.createRelation` to get the schema 
info and valid file list. For an empty table, with this pr, sql layer can use 
the `EmptyRelation` to solve the failure of read this table.
   
   The pr I submitted to your `firstWriteFailReadFix` branch should fix the sql 
analysis failure, like `org.apache.spark.sql.AnalysisException: Cannot resolve 
'h0.id in (`s0.id` = `h0.id`), the input columns is: [id#5461, name#5462, 
price#5463, ts#5464, flag#5465];`.
   
   For table created by spark-sql, there is the right schema persisted in 
`hoodie.properties`. Even if data fails to be written at the next commit, the 
schema should be retrieved correctly.


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


Reply via email to