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

Make error message better when bitwise_* operator takes wrong argument type #11249

Closed
2010YOUY01 opened this issue Jul 3, 2024 · 1 comment · Fixed by #12646
Closed

Make error message better when bitwise_* operator takes wrong argument type #11249

2010YOUY01 opened this issue Jul 3, 2024 · 1 comment · Fixed by #12646
Assignees
Labels
bug Something isn't working

Comments

@2010YOUY01
Copy link
Contributor

Describe the bug

This is not a bug, but the error message can be better:
The following queries' problem is just bitwise_* operator takes the not-supported argument type, so it should be a planning error.
Current Internal error messages can be confusing, or cause a false positive for testing code.

> select 2.0 << 1.5;
Internal error: Data type Float64 not supported for binary operation 'bitwise_shift_left' on dyn arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
> select 3.14 >> 1.2;
Internal error: Data type Float64 not supported for binary operation 'bitwise_shift_right' on dyn arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
> select 3.14 | 1.3;
Internal error: Data type Float64 not supported for binary operation 'bitwise_or' on dyn arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
> select 1.3 ^ 3.14;
Internal error: Data type Float64 not supported for binary operation 'bitwise_xor' on dyn arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
> select 1.5 & 1.6;
Internal error: Data type Float64 not supported for binary operation 'bitwise_and' on dyn arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker

To Reproduce

No response

Expected behavior

No response

Additional context

No response

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
2 participants