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

LIKE Operator Doesn't Always Work #30

Open
ossie-git opened this issue Jan 7, 2025 · 1 comment
Open

LIKE Operator Doesn't Always Work #30

ossie-git opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ossie-git
Copy link

ossie-git commented Jan 7, 2025

In the sample company.csv in the repository, you have a header that looks like this:

id,name,sector,public,value,description

and lines such as this:

ca2666dc-2f87-462e-ab3c-5c05aecf5b0a,"Baker, Jensen and Bradshaw",repurpose holistic markets,No,559086806.22,"Baker, Jensen and Bradshaw provides the following services:
- User-centric methodical archive
- Enterprise-wide bifurcated alliance
- Right-sized zero-defect success
- Mandatory user-facing flexibility"

However, trying a LIKE on the description column fails for some reason. For example:

:Q SELECT * FROM company WHERE description LIKE '%Baker%';

fails. I think it is because it has newlines

@shshemi shshemi self-assigned this Jan 7, 2025
@shshemi shshemi added the bug Something isn't working label Jan 7, 2025
@shshemi shshemi removed their assignment Jan 7, 2025
@shshemi
Copy link
Owner

shshemi commented Jan 7, 2025

Hi,
Thanks for bringing up the bug. I've confirmed that the issue is indeed present. It seems like the LIKE/ILIKE operators aren't working correctly with multiline strings in Polars. I've also checked the Python version and found the same problem. I've filed an issue for them here. We'll just have to wait for them to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants