Skip to content

Commit

Permalink
tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhangxian1008 committed Oct 14, 2022
1 parent 176d717 commit 4a361fa
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions dbms/src/Functions/FunctionsLogical.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct NotImpl
{
using ResultType = UInt8;

static inline UInt8 apply(A a)
static inline bool apply(A a)
{
return !a;
}
Expand Down Expand Up @@ -194,7 +194,7 @@ struct AssociativeOperationImpl
{}

/// Returns a combination of values in the i-th row of all columns stored in the constructor.
inline UInt8 apply(size_t i) const
inline bool apply(size_t i) const
{
if (Op::isSaturable())
{
Expand All @@ -220,8 +220,7 @@ struct AssociativeOperationImpl
}
else
{
// Searching keyword "cast_bool_reason" in this file to get the reason for static_cast<bool>
return Op::apply(static_cast<bool>(vec[i]), continuation.apply(i));
return Op::apply(vec[i], continuation.apply(i));
}
}
};
Expand All @@ -240,10 +239,9 @@ struct AssociativeOperationImpl<Op, 1>
: vec(in[in.size() - 1]->getData())
{}

inline UInt8 apply(size_t i) const
inline bool apply(size_t i) const
{
// Searching keyword "cast_bool_reason" in this file to get the reason for static_cast<bool>
return static_cast<bool>(vec[i]);
return vec[i];
}
};

Expand Down

0 comments on commit 4a361fa

Please sign in to comment.