diff options
| author | AlexSm <[email protected]> | 2024-01-04 15:09:05 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-04 15:09:05 +0100 |
| commit | dab291146f6cd7d35684e3a1150e5bb1c412982c (patch) | |
| tree | 36ef35f6cacb6432845a4a33f940c95871036b32 /contrib/clickhouse/src/Functions/bitXor.cpp | |
| parent | 63660ad5e7512029fd0218e7a636580695a24e1f (diff) | |
Library import 5, delete go dependencies (#832)
* Library import 5, delete go dependencies
* Fix yt client
Diffstat (limited to 'contrib/clickhouse/src/Functions/bitXor.cpp')
| -rw-r--r-- | contrib/clickhouse/src/Functions/bitXor.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/contrib/clickhouse/src/Functions/bitXor.cpp b/contrib/clickhouse/src/Functions/bitXor.cpp deleted file mode 100644 index 78c4c64d06e..00000000000 --- a/contrib/clickhouse/src/Functions/bitXor.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include <Functions/FunctionFactory.h> -#include <Functions/FunctionBinaryArithmetic.h> - -namespace DB -{ -namespace ErrorCodes -{ - extern const int LOGICAL_ERROR; -} - -namespace -{ - -template <typename A, typename B> -struct BitXorImpl -{ - using ResultType = typename NumberTraits::ResultOfBit<A, B>::Type; - static constexpr bool allow_fixed_string = true; - static const constexpr bool allow_string_integer = false; - - template <typename Result = ResultType> - static inline Result apply(A a, B b) - { - return static_cast<Result>(a) ^ static_cast<Result>(b); - } - -#if USE_EMBEDDED_COMPILER - static constexpr bool compilable = true; - - static inline llvm::Value * compile(llvm::IRBuilder<> & b, llvm::Value * left, llvm::Value * right, bool) - { - if (!left->getType()->isIntegerTy()) - throw Exception(ErrorCodes::LOGICAL_ERROR, "BitXorImpl expected an integral type"); - return b.CreateXor(left, right); - } -#endif -}; - -struct NameBitXor { static constexpr auto name = "bitXor"; }; -using FunctionBitXor = BinaryArithmeticOverloadResolver<BitXorImpl, NameBitXor, true, false>; - -} - -REGISTER_FUNCTION(BitXor) -{ - factory.registerFunction<FunctionBitXor>(); -} - -} |
