Skip to content

Conversation

@zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Dec 18, 2025

picked from #59003

… with dual (apache#59003)

The lexer rule `FROM_DUAL` was matching `FROM dualtbl` as `FROM DUAL` +
`tbl`,
  causing parse errors when using table/CTE names starting with 'dual'.

  Move DUAL handling from lexer to parser level

  - Remove `FROM_DUAL` lexer rule
  - Add `#fromDual` branch in `fromClause` parser rule
  - Handle `FromDualContext` in LogicalPlanBuilder
@zy-kkk zy-kkk requested a review from morrySnow as a code owner December 18, 2025 07:06
@hello-stephen
Copy link
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?

@zy-kkk
Copy link
Member Author

zy-kkk commented Dec 18, 2025

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 75.00% (3/4) 🎉
Increment coverage report
Complete coverage report

@morningman morningman changed the title [fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual branch-3.1: [fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual Dec 18, 2025
@morrySnow morrySnow changed the title branch-3.1: [fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual branch-3.1: [fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual #59003 Dec 19, 2025
@morrySnow morrySnow merged commit 6174205 into apache:branch-3.1 Dec 19, 2025
25 of 26 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