forked from ClickHouse/ClickHouse
/
notEquals.cpp
36 lines (28 loc) · 1.19 KB
/
notEquals.cpp
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
26
27
28
29
30
31
32
33
34
35
36
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsComparison.h>
#include <Functions/FunctionsLogical.h>
namespace DB
{
using FunctionNotEquals = FunctionComparison<NotEqualsOp, NameNotEquals>;
REGISTER_FUNCTION(NotEquals)
{
factory.registerFunction<FunctionNotEquals>();
}
FunctionOverloadResolverPtr createInternalFunctionNotEqualOverloadResolver(bool decimal_check_overflow)
{
return std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionNotEquals>(decimal_check_overflow));
}
template <>
ColumnPtr FunctionComparison<NotEqualsOp, NameNotEquals>::executeTupleImpl(
const ColumnsWithTypeAndName & x, const ColumnsWithTypeAndName & y, size_t tuple_size, size_t input_rows_count) const
{
FunctionOverloadResolverPtr func_builder_not_equals
= std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionNotEquals>(check_decimal_overflow));
FunctionOverloadResolverPtr func_builder_or
= std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionOr>());
return executeTupleEqualityImpl(
func_builder_not_equals,
func_builder_or,
x, y, tuple_size, input_rows_count);
}
}