afilipchik opened a new pull request #1514: [HUDI-774] Addressing incorrect Spark to Avro schema generation URL: https://github.com/apache/incubator-hudi/pull/1514 ## What is the purpose of the pull request Avro schema that is generated from Spark Dataframe (after SQL transformation) has incorrect defaults. Order of types is wrong ("null" must be first) and default is not set. If makes every schema change incompatible, which is only affecting compactions. This one is a reference PR. The solution is a bit hacky as I modify schema in place using reflection, there is probably a safer way to rebuild the schema. ## Brief change log *(for example:)* - Added HoodieAvroUtils.rewriteIncorrectDefaults - Updated AvroConversionHelper and AvroConversionUtils to use it after SchemaConverters.toAvroType ## Verify this pull request Added test to HoodieAvroUtilsTest to verify rewriter works properly. ## Committer checklist - [ ] Has a corresponding JIRA in PR title & commit - [ ] Commit message is descriptive of the change - [ ] CI is green - [ ] Necessary doc changes done or have another open PR - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
