andishgar commented on code in PR #47586:
URL: https://github.com/apache/arrow/pull/47586#discussion_r2413940617


##########
cpp/src/arrow/tensor.h:
##########
@@ -55,6 +55,13 @@ constexpr bool is_tensor_supported(Type::type type_id) {
 
 namespace internal {
 
+// TODO(GH-47578): Enable HalfFloatType
+template <typename ValueDataType>
+inline bool is_not_zero(typename ValueDataType::c_type value) {
+  typename ValueDataType::c_type zero = 0;
+  return value != zero;

Review Comment:
   Regarding 
[this](https://github.com/apache/arrow/pull/47586#issuecomment-3378351454), it 
was my mistake — NAN values are correctly treated as non-zero. 
   Note that in [those 
tests](https://github.com/apache/arrow/pull/47586#issuecomment-3378351454) , I 
should have enabled NaN comparison to get the correct result.
   



-- 
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]

Reply via email to