frank400 commented on a change in pull request #10112:
URL: https://github.com/apache/arrow/pull/10112#discussion_r623271882
##########
File path: cpp/src/gandiva/precompiled/arithmetic_ops.cc
##########
@@ -122,6 +122,34 @@ CAST_UNARY(castFLOAT4, float64, float32)
#undef CAST_UNARY
+// cast float types to int types.
+#define CAST_INT_FLOAT(NAME, IN_TYPE, OUT_TYPE) \
+ FORCE_INLINE \
+ gdv_##OUT_TYPE NAME##_##IN_TYPE(gdv_##IN_TYPE in) { \
Review comment:
Because, the cast_int_float function needs add on to the out int number
if the decimal part of the number to be cast is bigger than 0,4, eg. 5.6666
should end up as 6 after cast.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]