Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pruning on string columns using LIKE #507

Closed
nevi-me opened this issue Jun 5, 2021 · 7 comments · Fixed by #12978
Closed

Support pruning on string columns using LIKE #507

nevi-me opened this issue Jun 5, 2021 · 7 comments · Fixed by #12978
Labels
enhancement New feature or request

Comments

@nevi-me
Copy link
Contributor

nevi-me commented Jun 5, 2021

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 %.

@adriangb
Copy link
Contributor

adriangb commented Nov 3, 2024

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.

@adriangb
Copy link
Contributor

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

@alamb alamb changed the title Support pruning on string columns using starts_with Support pruning on string columns using LIKE Jan 6, 2025
@alamb
Copy link
Contributor

alamb commented Jan 6, 2025

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

@alamb
Copy link
Contributor

alamb commented Jan 6, 2025

Filed the following ticket to support starts_with: 🎣

@adriangb
Copy link
Contributor

adriangb commented Jan 6, 2025

I think we also need follow up tickets for:

  • NOT LIKE
  • Case insensitive matching

@alamb
Copy link
Contributor

alamb commented Jan 6, 2025

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)?

@adriangb
Copy link
Contributor

adriangb commented Jan 9, 2025

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
Labels
enhancement New feature or request
Projects
None yet
3 participants