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 Mar 15, 2022
1 parent 48862c6 commit 65748e7
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 65748e7

Please sign in to comment.