-
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
col / col
returns 1
when col = 0
#3615
Comments
Nice find! |
Should we remove the simplification |
Hi. While I was looking for good first issues, I found this one. I am not a professional developer (try to improve my rust skills) and it is my first try to contribute a project. I would like to ask if i am doing things right. Sorry, if I waste your time. Generally, how do you handle null? I used First I added 0 / 0 condition as BinaryExp just like other operators. You can find the code below:
Secondly, I changed https://github.com/apache/arrow-datafusion/blob/master/datafusion/optimizer/src/simplify_expressions.rs#L798 to this:
I wrote test but I am not sure about quality.
Thanks in advance :) |
Thank you, @retikulum, for taking this.
|
Hi @HaoYang670, Thanks for your reply. You can find my comments about issues.
|
Thank you, @retikulum. Your test case makes sense to me. 👍
Sorry, we couldn't. Because
|
Thank you for your feedback. I will create a PR, if 0/0 and A/0 rules are correct and removing A/A is the last decision. |
Describe the bug
A clear and concise description of what the bug is.
The expression
col / col
always returns 1 even ifcol = 0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
col / col
should returnnull
whencol
= 0Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: