MrSleeping123 opened a new pull request #4960:
URL: https://github.com/apache/hudi/pull/4960
## What is the purpose of the pull request
*The pr is syncing source table column comments to a hive table with syncing
hudi to hive when users add column comments to datasource schema.*
## Brief change log
- *Add a hive sync config(hoodie.datasource.hive_sync.sync_comment). This
config is false by default.*
- *While syncing data source to hudi, add table column comments to
datasource avro schema, and if the sync_comment is true, syncing column
comments to the hive table.*
*(for example: using spark datasource)*
`StructType schema = new StructType().add("key", "string", false, "comment")`
`sparkSession.createDataFrame(rdd, schema)`
`.write().format("org.apache.hudi")`
`......`
`.option("hoodie.datasource.hive_sync.sync_comment","true")`
`......`
`.save("/xxxx");`
## Verify this pull request
*Run TestHiveSyncTool#testUpdateTableComments and
TestHiveSyncTool#testSyncWithCommentedSchema successfully.*
This pull request is a trivial rework / code cleanup without any test
coverage.
## 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]