feat: MySQL CTE positive support via sjjian/parser merge tip - #3368
Merged
Merged
Conversation
Lock AC-004/005/006/009 against parser CTE positive support without changing audit business switches.
Pin replace to sjjian/parser@v0.0.0-20260825094816-b6aefd90e347 (merged CTE support), regenerate vendor via go mod; tidy drops unused gohive transitive chain.
PR Reviewer Guide 🔍(Review updated until commit 59844f2)
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Retarget pingcap/parser replace to sjjian/parser@v0.0.0-20260825094816-b6aefd90e347 and regenerate vendor so SelectStmt.With exists; restore EnvironmentTag.Color after vendor; use context.TODO in CTE Audit tests for SA1012.
|
Persistent review updated to latest commit 59844f2 |
iwanghc
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
关联的 issue
https://github.com/actiontech/sqle-ee/issues/3050
描述你的变更
pingcap/parserreplace 钉到sjjian/parser@v0.0.0-20260825094816-b6aefd90e347(主干 CTE 合并伪版本),并go mod vendor再生59844f2才真正落盘 CTE parser;go mod tidy旁路剔除未使用的 gohive 传递依赖,属预期而非无关大删sqle#3355)与业务仓third_party/parser终态(sqle#3357/sqle-ee#3057);本 PR 无splitter/cte.go、无./third_party/parser。go mod tidy旁路剔除未使用的 gohive 传递依赖Fixes https://github.com/actiontech/sqle-ee/issues/3050
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_docDescription
替换依赖至
sjjian/parser版本,支持CTE正向解析添加多项CTE单元测试覆盖审计、SQL类型和AST解析
更新 go.mod,剔除未使用依赖并调整版本映射
Diagram Walkthrough
File Walkthrough
cte_audit_test.go
新增 CTE 审计测试sqle/driver/mysql/cte_audit_test.go
cte_non_regression_test.go
新增 CTE 非回归测试sqle/driver/mysql/cte_non_regression_test.go
cte_sql_type_test.go
CTE SQL类型测试sqle/driver/mysql/cte_sql_type_test.go
cte_ast_test.go
CTE AST解析测试sqle/driver/mysql/util/cte_ast_test.go
go.mod
更新 go.mod 依赖go.mod
github.com/pingcap/parser为新版本github.com/beltran/gohive依赖