Repository navigation
fix(parser): support explicit default window modifiers - #28064
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Blocking compatibility regression: adding respect to the keyword map changes its token from ID to RESPECT. The ident production admits non_reserved_keyword, so column/table uses still work, but function_call_generic accepts only ID. As a result, select respect() parses on the exact base 1092ab7 and fails at () on this head. This can break an existing generic or user-defined function named with a MySQL non-reserved word; the new RESPECT remains a non-reserved identifier test does not cover that grammar path.
Please preserve the pre-PR function-name acceptance and add a base/head regression for respect(). One minimal option is to admit RESPECT through the keyword-function-name production: I applied that change only in an isolated review worktree, regenerated mysql_sql.go with zero conflicts, and the modifier, keyword-policy, and respect() tests all passed. A contextual lexer solution is also fine.
The intended LAG/LEAD/FIRST_VALUE/LAST_VALUE/NTH_VALUE default modifiers, named-window forms, modifier ordering/repetition negatives, AST canonicalization, generated-parser reproducibility, and the full mysql parser package otherwise passed locally. There is no meaningful runtime performance impact in the intended change.
dbbe415 to
95aaac6
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approved exact head 95aaac68b18d5e68615e0924dcef60069b12c0b6.
The previous compatibility blocker is fixed: RESPECT is admitted through the keyword-function-name path, so the pre-existing respect() generic-function syntax remains accepted while respect stays non-reserved in identifier contexts.
I rechecked the MySQL grammar boundary for LAG/LEAD/FIRST_VALUE/LAST_VALUE/NTH_VALUE, named windows, case/comments, the NTH_VALUE modifier order, duplicate/reversed/unsupported forms, AST canonicalization, and BVT equivalence. The generated parser reproduces exactly from mysql_sql.y; the focused counterexample matrix and full mysql parser package pass locally. The change is parser-only and adds no material execution-path or performance risk. No blocking findings remain.
Merge Queue Status
This pull request spent 5 minutes 17 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #28064 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Failing checks:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
…28064) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28031 ## What this PR does / why we need it: fix(parser): support explicit default window modifiers --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…28064) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28031 ## What this PR does / why we need it: fix(parser): support explicit default window modifiers --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…28064) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28031 ## What this PR does / why we need it: fix(parser): support explicit default window modifiers --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #28031
What this PR does / why we need it:
fix(parser): support explicit default window modifiers