Skip to content

fix: classify MySQL JSON_TABLE SELECT as dql for data export - #3365

Merged
Seechi-Yolo merged 4 commits into
mainfrom
sqle/fix-3097
Aug 21, 2026
Merged

Seechi-Yolo merged 4 commits into
mainfrom
sqle/fix-3097

Conversation

@LordofAvernus

@LordofAvernus LordofAvernus commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

User description

关联的 issue

https://github.com/actiontech/sqle-ee/issues/3097

描述你的变更

  • pingcap/parser replace 升级到已发布含 JSON_TABLE/JsonTableExpr 的伪版本,并以模块内容同步 vendor/github.com/pingcap/parser
  • TestInspect_assertSQLType 锁定含 JSON_TABLE 的 SELECT 为 dql,修复数据导出误判为非 DQL
  • 本变更为 CE 共享路径;EE 无 _ee 专有文件,经 CE main 合并后自动同步 main-ee

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

Made with Cursor


Description

  • 新增 MySQL 测试用例验证 JSON_TABLE 查询归类为 DQL

  • 更新 go.mod 中 pingcap/parser 的 replace 指向新版本


Diagram Walkthrough

flowchart LR
  A["\"修改 MySQL 测试用例\""] -- "新增测试用例" --> B["\"新增 JSON_TABLE DQL 测试\""]
  A -- "验证 DQL 分类" --> C["\"更新 go.mod 依赖版本\""]
Loading

File Walkthrough

Relevant files
Tests
mysql_test.go
增加 JSON_TABLE DQL 测试用例                                                                     

sqle/driver/mysql/mysql_test.go

  • 新增测试用例 "case 9 JSON_TABLE FROM"
  • 新增测试用例 "case 10 JSON_TABLE CROSS JOIN"
  • 校验 JSON_TABLE 查询被识别为 DQL
+10/-0   
Configuration changes
go.mod
更新 go.mod 中 parser 依赖版本                                                                   

go.mod

  • 更新 pingcap/parser 的 replace 指向新版本
  • 调整依赖版本号确保 JSON_TABLE 支持
+1/-1     

LordofAvernus and others added 3 commits August 21, 2026 12:25
Ensure MySQL JSON_TABLE queries stay classified as dql for data export.

Co-authored-by: Cursor <cursoragent@cursor.com>
Point replace to published LordofAvernus/parser pseudo-version with JsonTableExpr.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align vendor/github.com/pingcap/parser with published LordofAvernus/parser module.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 7f3a1f7)

🎫 Ticket compliance analysis 🔶

3097 - Partially compliant

Compliant requirements:

  • 新增针对 JSON_TABLE 查询归类为 DQL 的测试用例

Non-compliant requirements:

  • 邮件通知逻辑的修复未在此 PR 中体现

Requires further human verification:

[]

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

sjjian/parser#24 is on release-4.0.2 (e152d91); drop the temporary LordofAvernus fork.
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 7f3a1f7

@Seechi-Yolo
Seechi-Yolo merged commit 549e200 into main Aug 21, 2026
4 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.

2 participants