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

    ### What problem does this PR solve?
   
     Issue Number: close #xxx
   
     Related PR: #xxx
   
     Problem Summary:
     When a routine load job uses a column name that is a SQL reserved keyword 
(e.g., `group`) in a PRECEDING FILTER clause, the
     Nereids-to-legacy expression translator sets the slot label as the raw 
name (e.g., `group`) without quoting. When the legacy
     expression SQL is later re-parsed (e.g., during routine load reparse via 
`NereidsLoadUtils.parseExpressionSeq`), the unquoted
     reserved keyword causes a parse failure, pausing the routine load job.
   
     This PR quotes the slot label using `SqlUtils.getIdentSql()` so that 
reserved-keyword column names are properly backtick-quoted in
     the translated legacy expression SQL, preventing the parse failure.
   
     ### Release note
   
     None
   
     ### Check List (For Author)
   
     - Test <!-- At least one of them must be included. -->
         - [x] Regression test
         - [x] Unit Test
         - [ ] Manual test (add detailed scripts or steps below)
         - [ ] No need to test or manual test. Explain why:
             - [ ] This is a refactor/code format and no logic has been changed.
             - [ ] Previous test can cover this change.
             - [ ] No code files have been changed.
             - [ ] Other reason <!-- Add your reason?  -->
   
     - Behavior changed:
         - [x] Yes. Slot labels in routine-load legacy expression translation 
are now backtick-quoted, which changes the
     `toSqlWithoutTbl()` output but does not affect semantics.
   
     - Does this need documentation?
         - [x] No.
   
     ### Check List (For Reviewer who merge this PR)
   
     - [ ] Confirm the release note
     - [ ] Confirm test cases
     - [ ] Confirm document
     - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->


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