In the following code, when running in Legacy mode, it looks like we return the original array if any of the values cause an overflow. What we should be doing instead is returning the original value for the items in the input array that would cause overflow but return the abs of the other values.
Tests are passing, so I may just be misunderstanding something here.
match self.inner_abs_func.invoke(args) {
Err(DataFusionError::ArrowError(ArrowError::ComputeError(msg), _trace))
if msg.contains("overflow") =>
{
if self.eval_mode == EvalMode::Legacy {
Ok(args[0].clone())
Describe the bug
Describe the bug
I was reviewing the
abs
logic as part of https://github.com/apache/datafusion-comet/pull/638 and noticed that it seems incorrect.In the following code, when running in Legacy mode, it looks like we return the original array if any of the values cause an overflow. What we should be doing instead is returning the original value for the items in the input array that would cause overflow but return the abs of the other values.
Tests are passing, so I may just be misunderstanding something here.