Skip to content

[fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual - #59003

Merged
morningman merged 1 commit into
apache:masterfrom
zy-kkk:fix_dual
Dec 14, 2025
Merged

[fix](parser) Fix FROM DUAL incorrectly matching table names starting with dual#59003
morningman merged 1 commit into
apache:masterfrom
zy-kkk:fix_dual

Conversation

@zy-kkk

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (4/4) 🎉
Increment coverage report
Complete coverage report

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Dec 14, 2025
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@morningman
morningman merged commit f9867ed into apache:masterDec 14, 2025
30 of 31 checks passed
github-actionsBot pushed a commit that referenced this pull request Dec 14, 2025
… with dual (#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
@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (4/4) 🎉
Increment coverage report
Complete coverage report

nagisa-kunhah pushed a commit to nagisa-kunhah/doris that referenced this pull request Dec 14, 2025
… 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 deleted the fix_dual branch December 16, 2025 02:25
yiguolei pushed a commit that referenced this pull request Dec 16, 2025
… with dual (#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
yiguolei pushed a commit that referenced this pull request Dec 17, 2025
…mes starting with dual #59003 (#59021)
Cherry-picked from #59003
Co-authored-by: zy-kkk <zhongyk10@gmail.com>
zy-kkk added a commit to zy-kkk/doris that referenced this pull request Dec 18, 2025
… 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
morrySnow pushed a commit that referenced this pull request Dec 19, 2025
@yiguoleiyiguolei mentioned this pull request Jan 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/3.1.4-mergeddev/4.0.3-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@zy-kkk@hello-stephen@morningman@feiniaofeiafei@yiguolei@morrySnow