In the following on PR, I think we can move inlist related simplifier logic to `inlist_simplifier`.
Steps in inlist_simplifier
- early stage simplification like
expr IN () --> false, null IN/NOT IN
- convert long OR chain or AND chain to InList expressions like what
or_in_list_simplifier does
- shorten InList expressions like what
inlist_simplifier in this PR does
- convert final inlist to OR chain or AND chain if len < 3. Move inlist related simplifier out from
expr_simplifier
In this way, when the logic grows more complex, we can easily find out related conversion about specific Expr
Originally posted by @jayzhan211 in #8949 (comment)
Steps in inlist_simplifier
expr IN () --> false,null IN/NOT INor_in_list_simplifierdoesinlist_simplifierin this PR doesexpr_simplifierIn this way, when the logic grows more complex, we can easily find out related conversion about specific Expr
Originally posted by @jayzhan211 in #8949 (comment)