sqle icon indicating copy to clipboard operation
sqle copied to clipboard

FIX:rule_00112 中bigint和整数误触发

Open huajianxiaowanzi opened this issue 7 months ago • 1 comments

关联的 issue

#3049

描述你的变更

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

确认项(pr提交后操作)

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


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

huajianxiaowanzi avatar May 23 '25 02:05 huajianxiaowanzi

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 23 '25 02:05 CLAassistant