projjal commented on code in PR #13568:
URL: https://github.com/apache/arrow/pull/13568#discussion_r920123153
##########
cpp/src/gandiva/precompiled/arithmetic_ops.cc:
##########
@@ -469,6 +469,28 @@ BITWISE_NOT(int64)
#undef DATE_TYPES
#undef NUMERIC_BOOL_DATE_TYPES
#undef NUMERIC_DATE_TYPES
+
+#define SIGN(TYPE) \
+ FORCE_INLINE \
+ gdv_##TYPE sign_##TYPE(gdv_##TYPE in1) { \
+ gdv_##TYPE out; \
+ if (in1 > 0) { \
+ out = static_cast<gdv_##TYPE>(1); \
+ } else if (in1 < 0) { \
+ out = static_cast<gdv_##TYPE>(-1); \
+ } else { \
+ out = static_cast<gdv_##TYPE>(in1); \
Review Comment:
cast is unnecessary here
--
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]