Asthenia0412 opened a new pull request, #67975:
URL: https://github.com/apache/doris/pull/67975

   ## Proposed changes
   
   Issue Number: close #67488
   
   Problem Summary: Multi-table CDC jobs (`CREATE JOB ... ON STREAMING FROM 
MYSQL`) create the Doris target tables without the source table's comment. 
Column comments are already propagated from the JDBC metadata `REMARKS` field, 
but the table comment was hardcoded to an empty string in `CreateTableInfo`.
   
   This change:
   - Fetches the source table comment via `JdbcClient.getTableComment()` 
(implemented for MySQL) and passes it into the generated `CreateTableInfo`, so 
the `CREATE TABLE` DDL carries the original table comment.
   - Escapes the table comment with `SqlUtils.escapeQuota()` when the DDL is 
rendered in `CreateTableInfo.toString()`, so a comment containing double quotes 
can no longer produce invalid SQL (consistent with how column comments are 
already escaped).
   
   ## Type of change
   
   - [x] Feature
   - [ ] Bugfix
   - [ ] Improvement
   - [ ] Refactor
   - [ ] Documentation
   
   ## How has this been tested?
   
   - [x] Unit test: 
`StreamingJobUtilsTest#testGenerateCreateTableCmdsPropagatesTableComment`, 
`CreateTableInfoTest`
   - [ ] Regression test
   - [ ] Manual test
   
   ## Checklist
   
   - [x] I have read the [Contributing 
Guide](https://doris.apache.org/community/how-to-contribute/contribute/)
   - [x] The PR title follows the format `[type](module) short summary`
   - [x] The code follows the code style of this project
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to