Skip to content

Commit

Permalink
Support casting boolean to bigint (apache#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE authored and zhztheplayer committed Feb 28, 2022
1 parent b77276e commit 8c93d52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/gandiva/function_registry_arithmetic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ std::vector<NativeFunction> GetArithmeticFunctionRegistry() {
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, float32, int64),
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, float64, int64),
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, date64, int64),
UNARY_SAFE_NULL_IF_NULL(castBIGINT, {}, boolean, int64),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int8, int32),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int16, int32),
UNARY_SAFE_NULL_IF_NULL(castINT, {}, int64, int32),
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/gandiva/precompiled/arithmetic_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ NORMALIZE(float32, float32)

CAST_UNARY(castBIGINT, int32, int64)
CAST_UNARY(castBIGINT, date64, int64)
CAST_UNARY(castBIGINT, float32, int64)
CAST_UNARY(castBIGINT, float64, int64)
CAST_UNARY(castBIGINT, boolean, int64)
CAST_UNARY(castINT, int8, int32)
CAST_UNARY(castINT, int16, int32)
CAST_UNARY(castINT, int64, int32)
Expand Down

0 comments on commit 8c93d52

Please sign in to comment.