合并IN谓词
适用于 ✅ 开源版 ✅ 专业版 ✅ 企业版
一个 AND 谓词 结合共享相同操作数的 IN 谓词,通常可以合并成一个单一的 IN 谓词,将左侧操作数与右侧 IN 列表的交集进行比较。
使用 Settings.transformPatternsMergeInPredicates
,可以实现以下转换
-- With Settings.transformPatternsMergeInPredicates active, this: SELECT * FROM tab WHERE x IN (a, b, c) AND x IN (b, c, d); -- ... is transformed into the equivalent expression: SELECT * FROM tab WHERE x IN (b, c);
反馈
您对此页面有任何反馈吗? 我们很乐意听取您的意见!