aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Functions/bitTestAny.cpp
blob: 6b20d6c184c01ed9c289083d845a662906184b32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionBitTestMany.h>

namespace DB
{
namespace
{

struct BitTestAnyImpl
{
    template <typename A, typename B>
    static inline UInt8 apply(A a, B b) { return (a & b) != 0; }
};

struct NameBitTestAny { static constexpr auto name = "bitTestAny"; };
using FunctionBitTestAny = FunctionBitTestMany<BitTestAnyImpl, NameBitTestAny>;

}

REGISTER_FUNCTION(BitTestAny)
{
    factory.registerFunction<FunctionBitTestAny>();
}

}