Skip to content

Commit

Permalink
Fix implicit cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jvictorhuguenin committed Jul 16, 2021
1 parent 5a42c3c commit 44bf1ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/src/gandiva/precompiled/arithmetic_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ 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) { \
gdv_##OUT_TYPE out = round(in); \
return out;\
#define CAST_INT_FLOAT(NAME, IN_TYPE, OUT_TYPE) \
FORCE_INLINE \
gdv_##OUT_TYPE NAME##_##IN_TYPE(gdv_##IN_TYPE in) { \
gdv_##OUT_TYPE out = static_cast<gdv_##OUT_TYPE>(round(in)); \
return out; \
}

CAST_INT_FLOAT(castBIGINT, float32, int64)
Expand Down

0 comments on commit 44bf1ad

Please sign in to comment.