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

fix: Ensure hex and bitstring literals work inside SQL IN clauses #16101

Merged
merged 2 commits into from
May 8, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented May 7, 2024

Noticed SQL parsing didn't handle hex & bit string literals consistently between the visit_literal and visit_any_value codepaths, which would cause "IN" clauses using such literals to raise an error.

Factored out some common code, aligned the conversions, and added some test coverage.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels May 7, 2024
@alexander-beedie alexander-beedie added the A-sql Area: Polars SQL functionality label May 7, 2024
Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 80.98%. Comparing base (acb601d) to head (53fe744).

❗ Current head 53fe744 differs from pull request most recent head 042583c. Consider uploading reports for the commit 042583c to get more accurate results

Files Patch % Lines
crates/polars-sql/src/sql_expr.rs 85.71% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16101   +/-   ##
=======================================
  Coverage   80.97%   80.98%           
=======================================
  Files        1386     1386           
  Lines      178479   178489   +10     
  Branches     2877     2877           
=======================================
+ Hits       144530   144554   +24     
+ Misses      33458    33444   -14     
  Partials      491      491           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexander-beedie alexander-beedie changed the title fix: Ensure hex and bitstring literals work with SQL IN clauses fix: Ensure hex and bitstring literals work inside SQL IN clauses May 8, 2024
@ritchie46 ritchie46 merged commit 12b40b9 into pola-rs:main May 8, 2024
28 checks passed
@alexander-beedie alexander-beedie deleted the sql-anyvalue-literals branch May 8, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql Area: Polars SQL functionality fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants