#include #include #include #include namespace DB { namespace { struct NameGCD { static constexpr auto name = "gcd"; }; template struct GCDImpl : public GCDLCMImpl, NameGCD> { using ResultType = typename GCDLCMImpl::ResultType; static ResultType applyImpl(A a, B b) { using Int = typename NumberTraits::ToInteger::Type; return boost::integer::gcd(Int(a), Int(b)); // NOLINT(clang-analyzer-core.UndefinedBinaryOperatorResult) } }; using FunctionGCD = BinaryArithmeticOverloadResolver; } void registerFunctionGCD(FunctionFactory & factory) { factory.registerFunction(); } }