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

   ### What problem does this PR solve?
   
   Related PR: #67708
   
   Problem Summary:
   
   Backport the fix for invalid `SHOW CREATE VIEW` output when a view comment 
contains an apostrophe or backslash. Previously the comment was inserted 
directly into a single-quoted literal, so a value such as `O'Reilly` produced 
DDL that could not be replayed.
   
   Both view DDL construction paths now use a shared renderer. Unsafe comments 
are quoted with branch-4.1's existing `SqlLiteralUtils.quoteStringLiteral`, 
which preserves the active SQL-mode behavior, while safe comments retain the 
historical single-quoted output.
   
   ### Release note
   
   Fix exported view DDL for comments containing apostrophes or backslashes.
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test
       - [x] Regression test coverage included
   - Behavior changed:
       - [x] Yes. Unsafe view comments are emitted as replayable SQL string 
literals.
   - Does this need documentation?
       - [x] No.
   
   Test details:
   
   - `CreateViewTest`: 8 tests passed.
   - Full FE Maven reactor: `BUILD SUCCESS`.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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