Skip to content

[C++] Convert SingularOrList to is_in when possible #36535

Description

@westonpace

Describe the enhancement requested

Currently, when we encounter SingularOrList from Substrait, we convert it into an or list. In other words, expr1 || expr2 || expr3 || expr4. However, when all of the expressions are of the form field == literal (where field is the same) then we can replace it with is_in(field, [literal1, literal2, ..., literalN]).

This is arguably a little bit on the "planner/optimizer" slippery slope but it's a simple enough optimization and we already have an is_in function so I think it's a reasonable one to apply.

Component(s)

C++

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions