Skip to content

branch-4.1: [fix](fe) Quote variant predefined field comments in generated SQL - #69755

Merged
yiguolei merged 2 commits into
apache:branch-4.1from
eldenmoon:branch-pick-68194-4.1-20261028
Oct 29, 2026
Merged

yiguolei merged 2 commits into
apache:branch-4.1from
eldenmoon:branch-pick-68194-4.1-20261028

Conversation

@eldenmoon

Copy link
Copy Markdown
Member

cherry-pick #68194

### What problem does this PR solve?

Related PR: apache#68194

Problem Summary: Unescaped quotes and backslashes in predefined VARIANT field comments make generated SQL impossible to replay. Quote comments in both type renderers and use the existing SQL literal parser.

### Release note

Fix generated SQL for VARIANT predefined field comments containing quotes or backslashes.

### Check List (For Author)

- Test: Unit Test - TypeTest#testVariantFieldCommentToSqlRoundTrip: passed; full TypeTest and SQL regression pending.
- Behavior changed: Yes, as described above.
- Does this need documentation: No
### What problem does this PR solve?

Related PR: apache#68194

Problem Summary: Cover SQL rendering and parsing of VARIANT field comments containing quotes and backslashes on branch-4.1. Preserve the branch's existing type tests and use its default V1 JSON-string sink input for the DDL round-trip regression.

### Release note

None

### Check List (For Author)

- Test: Unit Test - TypeTest, 13 passed; Regression test - test_variant_predefine_comment_escape, 1 suite passed; build.sh --fe and Checkstyle passed. SQL regression used the newly built FE and an existing ASAN backend from the corresponding release branch.
- Behavior changed: No
- Does this need documentation: No
@eldenmoon
eldenmoon requested a review from yiguolei as a code owner October 28, 2026 09:42
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@eldenmoon

Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon

Copy link
Copy Markdown
Member Author

run p0

@yiguolei
yiguolei merged commit 5df207c into apache:branch-4.1 Oct 29, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants