icexelloss opened a new issue, #34520:
URL: https://github.com/apache/arrow/issues/34520

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I used this test to invoke a UDF via substrait that inputs and outputs 
"timestamp":
   
https://github.com/icexelloss/arrow/blob/pyarrow-udf-timestamp-type/python/pyarrow/tests/test_substrait.py#L449
   
   And hit with this error:
   ```
   >   raise ArrowNotImplementedError(message)
   E   pyarrow.lib.ArrowNotImplementedError: Function 'y=ceil(x)' has no kernel 
matching input types (timestamp[us, tz=UTC])
   E   
/home/icexelloss/workspace/arrow/cpp/src/arrow/compute/exec/expression.cc:548  
call.function->DispatchBest(&types)
   E   
/home/icexelloss/workspace/arrow/cpp/src/arrow/engine/substrait/relation_internal.cc:550
  des_expr.Bind(*input.output_schema)
   E   
/home/icexelloss/workspace/arrow/cpp/src/arrow/engine/substrait/serde.cc:212  
FromProto(root_rel.has_root() ? root_rel.root().input() : root_rel.rel(), 
ext_set, conversion_options)
   E   
/home/icexelloss/workspace/arrow/cpp/src/arrow/engine/substrait/util.cc:48  
DeserializePlan(substrait_buffer, registry, nullptr, conversion_options)
   ```
   
   After some debugging, I found this ultimately hit this comparison (between 
the input data type declared by the kernel and the data type of the actual 
input) and failed:
   
https://github.com/icexelloss/arrow/blob/pyarrow-udf-timestamp-type/cpp/src/arrow/compare.cc#L1375
   
   I printed the `left_fp` and `right_fp` values in the debugger, they are 
different, but I cannot make sense of what they mean:
   ```
   print left_fp
   (const std::basic_string<char, std::char_traits<char>, std::allocator<> >) 
$3 = {
     _M_dataplus = (_M_p = "@Sn3:UTC")
     _M_string_length = 8
      = (_M_local_buf = "@Sn3:UTC\0\xd1LwkU", _M_allocated_capacity = 
4851596407044199232)
   }
   print right_fp
   (const std::basic_string<char, std::char_traits<char>, std::allocator<> >) 
$4 = {
     _M_dataplus = (_M_p = "@Su3:UTC")
     _M_string_length = 8
      =
    (_M_local_buf = "@Su3:UTC\0\"\xb3wkU", _M_allocated_capacity = 
4851596407044657984)
   }
   ```
   
   
   
   
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to