Skip to content

Support pruning on string columns using LIKE #507

Description

@nevi-me

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

From looking at the pruning logic, it appears that we can prune inputs based on col = 'string_value', but we can't prune on col LIKE 'value%'.

We should be able to support LIKE and NOT LIKE.

Describe the solution you'd like

Extend the pruning logic to generate a pruning filter for LIKE and NOT LIKE.

Describe alternatives you've considered

None

Additional context

Spark will push down a LIKE filter if it can be converted to a starts_with, normally by checking if the string doesn't start with %.

Activity

  1. adriangb commented on Nov 3, 2024

    @adriangb
    Contributor

    Thanks for the idea. We are close to implementing this in #12978. It adds support for pushing down like but notably does not add support for starts_with as that will be done in a followup PR.

  2. adriangb commented on Dec 30, 2024

    @adriangb
    Contributor

    @alamb I think we should re-open this for starts_with.

  3. changed the title [-]Support pruning on string columns using starts_with[/-] [+]Support pruning on string columns using LIKE[/+] on Jan 6, 2025
  4. alamb commented on Jan 6, 2025

    @alamb
    Contributor

    Thanks @adriangb -- I changed this ticket to refer to LIKE / NOT LIKE and I will file a follow on ticket for supporting starts_with

  5. alamb commented on Jan 6, 2025

    @alamb
    Contributor

    Filed the following ticket to support starts_with: 🎣

  6. adriangb commented on Jan 6, 2025

    @adriangb
    Contributor

    I think we also need follow up tickets for:

    • NOT LIKE
    • Case insensitive matching
  7. alamb commented on Jan 6, 2025

    @alamb
    Contributor

    I think we also need follow up tickets for:

    • NOT LIKE
    • Case insensitive matching

    Sounds good -- can you please file them (and the more hints you leave in the ticket the more likely it is for someone else to be able to do it)?

  8. adriangb commented on Jan 9, 2025

    @adriangb
    Contributor

    Sounds good -- can you please file them (and the more hints you leave in the ticket the more likely it is for someone else to be able to do it)?

    Done!

    #14053
    #14054

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions