CuteChuanChuan commented on PR #19994:
URL: https://github.com/apache/datafusion/pull/19994#issuecomment-3830454965
> Due to an implementation issue (see comment on `safe_divide_arrays`) we're
also not comparing the same thing entirely.
> I tinkered a bit with the existing code to make sure `expr_or_expr` is
actually used, and that brings the results much closer, to the point where I'm
wondering if the divide-by-zero special case is still worth it.
> The changes I made for `expr_or_expr` are general improvements, so I'll
make a separate PR with those.
@pepijnve
Thanks for the detailed analysis and pointing out the bug in my code! I see
the issue now - I
should use the condition in the when clause, but the implementation only
handles the d != 0 case correctly. I'll wait for your `expr_or_expr`
improvements PR. Once that's merged, we can re-evaluate whether this
optimization is still beneficial. If the gap is minimal, I'm happy to close
this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]