ClickHouse

Форк
0
/
greater.cpp 
41 строка · 1.4 Кб
1
#include <Functions/FunctionFactory.h>
2
#include <Functions/FunctionsComparison.h>
3
#include <Functions/FunctionsLogical.h>
4

5
namespace DB
6
{
7

8
using FunctionGreater = FunctionComparison<GreaterOp, NameGreater>;
9
using FunctionEquals = FunctionComparison<EqualsOp, NameEquals>;
10

11
REGISTER_FUNCTION(Greater)
12
{
13
    factory.registerFunction<FunctionGreater>();
14
}
15

16
template <>
17
ColumnPtr FunctionComparison<GreaterOp, NameGreater>::executeTupleImpl(
18
    const ColumnsWithTypeAndName & x, const ColumnsWithTypeAndName & y, size_t tuple_size, size_t input_rows_count) const
19
{
20
    FunctionOverloadResolverPtr greater
21
        = std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionGreater>(check_decimal_overflow));
22

23
    FunctionOverloadResolverPtr func_builder_or
24
        = std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionOr>());
25

26
    FunctionOverloadResolverPtr func_builder_and
27
        = std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionAnd>());
28

29
    FunctionOverloadResolverPtr func_builder_equals
30
        = std::make_unique<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionEquals>(check_decimal_overflow));
31

32
    return executeTupleLessGreaterImpl(
33
        greater,
34
        greater,
35
        func_builder_and,
36
        func_builder_or,
37
        func_builder_equals,
38
        x, y, tuple_size, input_rows_count);
39
}
40

41
}
42

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.