-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: Add SQL support for bit_count
and bitwise &
, |
, and xor
operators
#19114
Conversation
8848a79
to
006769a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19114 +/- ##
==========================================
- Coverage 80.24% 80.23% -0.02%
==========================================
Files 1523 1523
Lines 209524 209538 +14
Branches 2434 2434
==========================================
- Hits 168127 168113 -14
- Misses 40842 40870 +28
Partials 555 555 ☔ View full report in Codecov by Sentry. |
40beed0
to
8cc43fa
Compare
Is ci failure related? I see the merge sorted feature activated? |
8cc43fa
to
514fd03
Compare
Seems related to the activation of the @orlp, can you see how it sneaks in, by any chance? |
@alexander-beedie There is a known issue with the current implementation of |
Done! |
8a606b6
to
4407752
Compare
Note that there is no consensus/standard for use of an underscore in SQL
BIT*
function names1, so we support it with/without for the most straightforward compatibility (eg:BITAND
andBIT_AND
are both allowed).Drive-by: added
merge_sorted
feature gate in polars-stream to fix docs build (see core-dev chat).Example
Apply bitwise ops via the SQL interface:
Footnotes
PostgreSQL supports
BIT_COUNT
as a function, butBIT_AND
andBIT_OR
are available only as operators. However, multiple other dialects (Oracle, etc) support both the operator and function form, so we follow suit here. ↩