Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cpp/src/gandiva/function_registry_arithmetic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ std::vector<NativeFunction> GetArithmeticFunctionRegistry() {
UNARY_SAFE_NULL_IF_NULL(not, {}, boolean, boolean),
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, int32, int64),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int64, int32),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int16, int32),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int8, int32),
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, decimal128, int64),

// cast to float32
UNARY_CAST_TO_FLOAT32(int32), UNARY_CAST_TO_FLOAT32(int64),
UNARY_CAST_TO_FLOAT32(float64), UNARY_CAST_TO_FLOAT32(int8),
UNARY_CAST_TO_FLOAT32(int8), UNARY_CAST_TO_FLOAT32(int16),
UNARY_CAST_TO_FLOAT33(int64), UNARY_CAST_TO_FLOAT32(float64),
UNARY_CAST_TO_FLOAT32(int32),

// cast to int32
UNARY_CAST_TO_INT32(float32), UNARY_CAST_TO_INT32(float64),
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/gandiva/precompiled/arithmetic_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ NUMERIC_DATE_TYPES(COMPARE_SIX_VALUES, least, <)
CAST_UNARY(castBIGINT, int32, int64)
CAST_UNARY(castINT, int64, int32)
CAST_UNARY(castINT, int8, int32)
CAST_UNARY(castINT, int16, int32)
CAST_UNARY(castFLOAT4, int8, float32)
CAST_UNARY(castFLOAT4, int16, float32)
CAST_UNARY(castFLOAT4, int32, float32)
CAST_UNARY(castFLOAT4, int64, float32)
CAST_UNARY(castFLOAT8, int32, float64)
Expand Down