MrSleeping123 opened a new pull request #4786:
URL: https://github.com/apache/hudi/pull/4786


   ## 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)*
   `StructFields[] fields = new StructFields[1];`
   `fields[0] = fields[0].withComment("comment");`
   `StructType schema = new StructType(fields);`
   `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.
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test 
coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please 
describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## 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]


Reply via email to