Fix bool unary expression sometimes returns no data (#25016)

Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
yah01 2023-06-20 16:38:41 +08:00 committed by GitHub
parent 81e9c8d608
commit 73b7cf5df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -431,7 +431,10 @@ template <typename T>
auto
ExecExprVisitor::ExecUnaryRangeVisitorDispatcher(UnaryRangeExpr& expr_raw)
-> BitsetType {
if constexpr (std::is_integral_v<T>) {
// bool type is integral but will never be overflowed,
// the check method may evaluate it out of range with bool type,
// exclude bool type here
if constexpr (std::is_integral_v<T> && !std::is_same_v<T, bool>) {
auto& expr = static_cast<UnaryRangeExprImpl<int64_t>&>(expr_raw);
auto val = expr.value_;