Skip to content

Additional IN / NOT IN simplifications #8970

@alamb

Description

@alamb
          In the following on PR, I think we can move inlist related simplifier logic to `inlist_simplifier`.

Steps in inlist_simplifier

  1. early stage simplification like expr IN () --> false, null IN/NOT IN
  2. convert long OR chain or AND chain to InList expressions like what or_in_list_simplifier does
  3. shorten InList expressions like what inlist_simplifier in this PR does
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions