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

added ilike clause compilation #229

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Conversation

howbownotnow
Copy link
Contributor

@howbownotnow howbownotnow commented Dec 21, 2022

column.ilike("text") was compiled like lower(column) LIKE lower(text) request instead of column ILIKE 'text'. lower() function in Clickhouse works only with ASCII symbols. So, if column and text contained non-ASCII symbols, ilike operation worked not as expected. In this fix compilation of ilike() and 'not_ilike()' methods like column ILIKE 'text' and column NOT ILIKE 'text' is implemented.

Checklist:

  • [ x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • [ x] Add or update relevant docs, in the docs folder and in code.
  • [ x] Ensure PR doesn't contain untouched code reformatting: spaces, etc.
  • [ x] Run flake8 and fix issues.
  • [ x] Run pytest no tests failed. See https://clickhouse-driver.readthedocs.io/en/latest/development.html.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0009%) to 83.681% when pulling 1571464 on howbownotnow:master into 7cd1db9 on xzkostyan:master.

@xzkostyan xzkostyan merged commit 76af10a into xzkostyan:master Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ilike operation works wrong
3 participants