ClickHouse/src/Functions/equals.cpp
Nikolai Kochetov 32a23244c9 Remove context from comparison functions.
(cherry picked from commit 57608cc6f9)
2024-02-14 12:38:13 +00:00

34 lines
954 B
C++

#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsComparison.h>
#include <Functions/FunctionsLogical.h>
namespace DB
{
using FunctionEquals = FunctionComparison<EqualsOp, NameEquals>;
REGISTER_FUNCTION(Equals)
{
factory.registerFunction<FunctionEquals>();
}
template <>
ColumnPtr FunctionComparison<EqualsOp, NameEquals>::executeTupleImpl(
const ColumnsWithTypeAndName & x, const ColumnsWithTypeAndName & y, size_t tuple_size, size_t input_rows_count) const
{
FunctionOverloadResolverPtr func_builder_equals
= std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionEquals>(check_decimal_overflow));
FunctionOverloadResolverPtr func_builder_and
= std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionAnd>());
return executeTupleEqualityImpl(
func_builder_equals,
func_builder_and,
x, y, tuple_size, input_rows_count);
}
}