xushiyan commented on issue #3617:
URL: https://github.com/apache/hudi/issues/3617#issuecomment-927234056


   @novakov-alexey the problem is caused by 20210907094837.commit having 
`"schema" : null`. Schema reader is reading from commit file. when it's null 
it's gonna look for basefile (parquet) to get the schema. But in this case your 
data is empty. 
   
   I think this is current behavior when data is empty, commit metadata are all 
null or empty. You could try manually set a json serialized schema string to 
the commit file. Something like this
   
   ```json
     "extraMetadata" : {
       "schema" : "{\"type\":\"record\",\"name\":\"FullName\",\"fields\": []}"
     },
   ```
   
   But I do think it makes sense to make the schema available in commit file 
even when it's empty data. We may make a fix for this. Meanwhile, let us know 
if manually setting the schema string works for you.
   
   BTW you don't need to set       "hoodie.consistency.check.enabled" -> 
"true", as S3 has become strongly consistent some time back.


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