-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Need to type coercion for arithmetic op when the left and right type are same #3387
Comments
current plan for datafusion
spark plan:
|
We follow the spark rule in the decimal type coercion https://github.com/apache/arrow-datafusion/blob/c359018baa8bbb0a227e83df948c903cde4d701f/datafusion/expr/src/binary_rule.rs#L353 |
cc @alamb @andygrove I will fix it later. |
Can we fix this and #3388 together? |
There is more context about this issue here: #3254 (comment) |
When I try to fix this bug with remove below code
When move the type coercion to the logical phase, the result data type of the expr can be determined in the logical phase. In the physical phase, we must not use the type coercion to coerce the data type. |
* remove type coercion binary from phy * fix test case * revert the fix for #3387 * type coercion before simplify expression * complete remove the type coercion in the physical plan * refactor * merge master * refactor * do type coercion in the simplify expression * Add comments * fix: fmt Co-authored-by: Andrew Lamb <[email protected]>
Describe the bug
#3254 (comment)
bug code: https://github.com/apache/arrow-datafusion/blob/master/datafusion/expr/src/binary_rule.rs#L293
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: