-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow comparison between boolean and int values #16798
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
base: main
Are you sure you want to change the base?
Allow comparison between boolean and int values #16798
Conversation
what about using explicit casting in applications? For example: > select not(arrow_cast(1, 'Boolean'));
+------------------------------------------+
| NOT arrow_cast(Int64(1),Utf8("Boolean")) |
+------------------------------------------+
| false |
+------------------------------------------+ IIRC, PostgreSQL doesn't support such comparisons, while DuckDB does. |
Just tried PG
Am I missing something? 🤔 |
@comphead We're talking about implicit conversions PG: This PR: false true |
Thanks @2010YOUY01
But IMHO we should stick to PG behavior |
Which issue does this PR close?
Closes #16797
Rationale for this change
This PR enables comparison between boolean and interger types which already supported by arrow cast
What changes are included in this PR?
Added boolean_coercion
Are these changes tested?
Added tests
Are there any user-facing changes?
No