Skip to content

FIX:rule_00112 中bigint和整数误触发 #3051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

huajianxiaowanzi
Copy link

@huajianxiaowanzi huajianxiaowanzi commented May 23, 2025

关联的 issue

#3049

描述你的变更

  • 简化类型判断逻辑:将对常量类型的判断(parserdriver.ValueExpr)由原来的 Datum.Kind() 方式,统一改为直接取 node.Type.Tp。
  • 增加了整数类型宽松判断:对于比较类型不同的场景,如果两个类型都属于整数类型(如 tinyint, int, bigint 等),则认为通过,不再报违规。
  • 新增了单元测试:将issue中误触发的sql加入测试用例

确认项(pr提交后操作)

Tip

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


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

@CLAassistant
Copy link

CLAassistant commented May 23, 2025

CLA assistant check
All committers have signed the CLA.

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