/root/doris/be/src/vec/functions/math.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #include <cstdint> |
19 | | #include <cstring> |
20 | | |
21 | | // IWYU pragma: no_include <bits/std_abs.h> |
22 | | #include <dlfcn.h> |
23 | | |
24 | | #include <cmath> |
25 | | #include <string> |
26 | | #include <type_traits> |
27 | | |
28 | | #include "common/status.h" |
29 | | #include "util/debug/leak_annotations.h" |
30 | | #include "vec/columns/column.h" |
31 | | #include "vec/columns/column_string.h" |
32 | | #include "vec/columns/column_vector.h" |
33 | | #include "vec/core/types.h" |
34 | | #include "vec/data_types/data_type_string.h" |
35 | | #include "vec/data_types/number_traits.h" |
36 | | #include "vec/functions/function_binary_arithmetic.h" |
37 | | #include "vec/functions/function_const.h" |
38 | | #include "vec/functions/function_math_log.h" |
39 | | #include "vec/functions/function_math_unary.h" |
40 | | #include "vec/functions/function_math_unary_alway_nullable.h" |
41 | | #include "vec/functions/function_totype.h" |
42 | | #include "vec/functions/function_unary_arithmetic.h" |
43 | | #include "vec/functions/simple_function_factory.h" |
44 | | #include "vec/utils/stringop_substring.h" |
45 | | |
46 | | namespace doris::vectorized { |
47 | | |
48 | | struct LnImpl; |
49 | | struct Log10Impl; |
50 | | struct Log2Impl; |
51 | | |
52 | | struct AcosName { |
53 | | static constexpr auto name = "acos"; |
54 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_acos |
55 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < -1 || x > 1; } |
56 | | }; |
57 | | using FunctionAcos = |
58 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AcosName, std::acos>>; |
59 | | |
60 | | struct AcoshName { |
61 | | static constexpr auto name = "acosh"; |
62 | 10 | static constexpr bool is_invalid_input(Float64 x) { return x < 1; } |
63 | | }; |
64 | | using FunctionAcosh = |
65 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AcoshName, std::acosh>>; |
66 | | |
67 | | struct AsinName { |
68 | | static constexpr auto name = "asin"; |
69 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_asin |
70 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < -1 || x > 1; } |
71 | | }; |
72 | | using FunctionAsin = |
73 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AsinName, std::asin>>; |
74 | | |
75 | | struct AsinhName { |
76 | | static constexpr auto name = "asinh"; |
77 | | }; |
78 | | using FunctionAsinh = FunctionMathUnary<UnaryFunctionPlain<AsinhName, std::asinh>>; |
79 | | |
80 | | struct AtanName { |
81 | | static constexpr auto name = "atan"; |
82 | | }; |
83 | | using FunctionAtan = FunctionMathUnary<UnaryFunctionPlain<AtanName, std::atan>>; |
84 | | |
85 | | struct AtanhName { |
86 | | static constexpr auto name = "atanh"; |
87 | 10 | static constexpr bool is_invalid_input(Float64 x) { return x <= -1 || x >= 1; } |
88 | | }; |
89 | | using FunctionAtanh = |
90 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<AtanhName, std::atanh>>; |
91 | | |
92 | | template <PrimitiveType AType, PrimitiveType BType> |
93 | | struct Atan2Impl { |
94 | | using A = typename PrimitiveTypeTraits<AType>::ColumnItemType; |
95 | | using B = typename PrimitiveTypeTraits<BType>::ColumnItemType; |
96 | | static constexpr PrimitiveType ResultType = TYPE_DOUBLE; |
97 | | static const constexpr bool allow_decimal = false; |
98 | | |
99 | | template <PrimitiveType type> |
100 | 21 | static inline double apply(A a, B b) { |
101 | 21 | return std::atan2((double)a, (double)b); |
102 | 21 | } Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_2EE5applyILS2_9EEEdhh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_3EE5applyILS2_9EEEdha Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_4EE5applyILS2_9EEEdhs Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_5EE5applyILS2_9EEEdhi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_6EE5applyILS2_9EEEdhl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_7EE5applyILS2_9EEEdhn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_8EE5applyILS2_9EEEdhf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE2ELS2_9EE5applyILS2_9EEEdhd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_2EE5applyILS2_9EEEdah Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_3EE5applyILS2_9EEEdaa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_4EE5applyILS2_9EEEdas Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_5EE5applyILS2_9EEEdai Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_6EE5applyILS2_9EEEdal Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_7EE5applyILS2_9EEEdan Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_8EE5applyILS2_9EEEdaf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE3ELS2_9EE5applyILS2_9EEEdad Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_2EE5applyILS2_9EEEdsh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_3EE5applyILS2_9EEEdsa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_4EE5applyILS2_9EEEdss Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_5EE5applyILS2_9EEEdsi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_6EE5applyILS2_9EEEdsl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_7EE5applyILS2_9EEEdsn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_8EE5applyILS2_9EEEdsf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE4ELS2_9EE5applyILS2_9EEEdsd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_2EE5applyILS2_9EEEdih Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_3EE5applyILS2_9EEEdia Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_4EE5applyILS2_9EEEdis Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_5EE5applyILS2_9EEEdii Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_6EE5applyILS2_9EEEdil Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_7EE5applyILS2_9EEEdin Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_8EE5applyILS2_9EEEdif Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE5ELS2_9EE5applyILS2_9EEEdid Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_2EE5applyILS2_9EEEdlh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_3EE5applyILS2_9EEEdla Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_4EE5applyILS2_9EEEdls Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_5EE5applyILS2_9EEEdli Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_6EE5applyILS2_9EEEdll Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_7EE5applyILS2_9EEEdln Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_8EE5applyILS2_9EEEdlf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE6ELS2_9EE5applyILS2_9EEEdld Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_2EE5applyILS2_9EEEdnh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_3EE5applyILS2_9EEEdna Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_4EE5applyILS2_9EEEdns Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_5EE5applyILS2_9EEEdni Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_6EE5applyILS2_9EEEdnl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_7EE5applyILS2_9EEEdnn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_8EE5applyILS2_9EEEdnf Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE7ELS2_9EE5applyILS2_9EEEdnd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_2EE5applyILS2_9EEEdfh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_3EE5applyILS2_9EEEdfa Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_4EE5applyILS2_9EEEdfs Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_5EE5applyILS2_9EEEdfi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_6EE5applyILS2_9EEEdfl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_7EE5applyILS2_9EEEdfn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_8EE5applyILS2_9EEEdff Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE8ELS2_9EE5applyILS2_9EEEdfd Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_2EE5applyILS2_9EEEddh Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_3EE5applyILS2_9EEEdda Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_4EE5applyILS2_9EEEdds Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_5EE5applyILS2_9EEEddi Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_6EE5applyILS2_9EEEddl Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_7EE5applyILS2_9EEEddn Unexecuted instantiation: _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_8EE5applyILS2_9EEEddf _ZN5doris10vectorized9Atan2ImplILNS_13PrimitiveTypeE9ELS2_9EE5applyILS2_9EEEddd Line | Count | Source | 100 | 21 | static inline double apply(A a, B b) { | 101 | 21 | return std::atan2((double)a, (double)b); | 102 | 21 | } |
|
103 | | }; |
104 | | struct Atan2Name { |
105 | | static constexpr auto name = "atan2"; |
106 | | }; |
107 | | using FunctionAtan2 = FunctionBinaryArithmetic<Atan2Impl, Atan2Name, false>; |
108 | | |
109 | | struct CosName { |
110 | | static constexpr auto name = "cos"; |
111 | | }; |
112 | | using FunctionCos = FunctionMathUnary<UnaryFunctionPlain<CosName, std::cos>>; |
113 | | |
114 | | struct CoshName { |
115 | | static constexpr auto name = "cosh"; |
116 | | }; |
117 | | using FunctionCosh = FunctionMathUnary<UnaryFunctionPlain<CoshName, std::cosh>>; |
118 | | |
119 | | struct EImpl { |
120 | | static constexpr auto name = "e"; |
121 | | static constexpr double value = 2.7182818284590452353602874713526624977572470; |
122 | | }; |
123 | | using FunctionE = FunctionMathConstFloat64<EImpl>; |
124 | | |
125 | | struct PiImpl { |
126 | | static constexpr auto name = "pi"; |
127 | | static constexpr double value = 3.1415926535897932384626433832795028841971693; |
128 | | }; |
129 | | using FunctionPi = FunctionMathConstFloat64<PiImpl>; |
130 | | |
131 | | struct ExpName { |
132 | | static constexpr auto name = "exp"; |
133 | | }; |
134 | | using FunctionExp = FunctionMathUnary<UnaryFunctionPlain<ExpName, std::exp>>; |
135 | | |
136 | | struct LogName { |
137 | | static constexpr auto name = "log"; |
138 | | }; |
139 | | |
140 | | template <PrimitiveType AType, PrimitiveType BType> |
141 | | struct LogImpl { |
142 | | using A = typename PrimitiveTypeTraits<AType>::CppNativeType; |
143 | | using B = typename PrimitiveTypeTraits<BType>::CppNativeType; |
144 | | static constexpr PrimitiveType ResultType = TYPE_DOUBLE; |
145 | | using Traits = NumberTraits::BinaryOperatorTraits<AType, BType>; |
146 | | |
147 | | static const constexpr bool allow_decimal = false; |
148 | | static constexpr double EPSILON = 1e-9; |
149 | | |
150 | | template <PrimitiveType Result = ResultType> |
151 | | static void apply(const typename Traits::ArrayA& a, B b, |
152 | | typename PrimitiveTypeTraits<Result>::ColumnType::Container& c, |
153 | 0 | typename Traits::ArrayNull& null_map) { |
154 | 0 | size_t size = c.size(); |
155 | 0 | UInt8 is_null = b <= 0; |
156 | 0 | memset(null_map.data(), is_null, size); |
157 | |
|
158 | 0 | if (!is_null) { |
159 | 0 | for (size_t i = 0; i < size; i++) { |
160 | 0 | if (a[i] <= 0 || std::fabs(a[i] - 1.0) < EPSILON) { |
161 | 0 | null_map[i] = 1; |
162 | 0 | } else { |
163 | 0 | c[i] = static_cast<Float64>(std::log(static_cast<Float64>(b)) / |
164 | 0 | std::log(static_cast<Float64>(a[i]))); |
165 | 0 | } |
166 | 0 | } |
167 | 0 | } |
168 | 0 | } Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIhLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERS9_ Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_2EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEbRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_3EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEaRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_4EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEsRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_5EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEiRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_6EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEElRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_7EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEnRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_8EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEfRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_9EE5applyILS2_9EEEvRKNS0_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_32NoTrackingDefaultMemoryAllocatorEEELm16ELm15EEEdRNS_19PrimitiveTypeTraitsIXT_EE10ColumnType9ContainerERNS5_IhLm4096ES8_Lm16ELm15EEE |
169 | | |
170 | | template <PrimitiveType Result> |
171 | | static inline typename PrimitiveTypeTraits<Result>::CppNativeType apply(A a, B b, |
172 | 6 | UInt8& is_null) { |
173 | 6 | is_null = a <= 0 || b <= 0 || std::fabs(a - 1.0) < EPSILON; |
174 | 6 | return static_cast<Float64>(std::log(static_cast<Float64>(b)) / |
175 | 6 | std::log(static_cast<Float64>(a))); |
176 | 6 | } Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEblRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE2ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEbdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEabRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEaaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEasRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEaiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEalRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEanRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEafRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE3ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEadRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEssRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEslRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE4ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEsdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEibRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEiaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEisRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEiiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEilRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEinRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEifRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE5ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEidRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeElbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeElaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeElsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEliRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEllRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeElnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeElfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE6ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEldRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEniRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnlRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEnfRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE7ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEndRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEflRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEffRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE8ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEfdRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_2EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdbRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_3EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdaRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_4EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdsRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_5EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdiRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_6EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdlRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_7EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdnRh Unexecuted instantiation: _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_8EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEdfRh _ZN5doris10vectorized7LogImplILNS_13PrimitiveTypeE9ELS2_9EE5applyILS2_9EEENS_19PrimitiveTypeTraitsIXT_EE13CppNativeTypeEddRh Line | Count | Source | 172 | 6 | UInt8& is_null) { | 173 | 6 | is_null = a <= 0 || b <= 0 || std::fabs(a - 1.0) < EPSILON; | 174 | 6 | return static_cast<Float64>(std::log(static_cast<Float64>(b)) / | 175 | 6 | std::log(static_cast<Float64>(a))); | 176 | 6 | } |
|
177 | | }; |
178 | | using FunctionLog = FunctionBinaryArithmetic<LogImpl, LogName, true>; |
179 | | |
180 | | template <typename A> |
181 | | struct SignImpl { |
182 | | static constexpr PrimitiveType ResultType = TYPE_TINYINT; |
183 | 6 | static inline UInt8 apply(A a) { |
184 | 6 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) |
185 | 3 | return static_cast<UInt8>(a < A(0) ? -1 : a == A(0) ? 0 : 1); |
186 | 3 | else if constexpr (std::is_signed_v<A>) |
187 | 3 | return static_cast<UInt8>(a < 0 ? -1 : a == 0 ? 0 : 1); |
188 | 0 | else if constexpr (std::is_unsigned_v<A>) |
189 | 0 | return static_cast<UInt8>(a == 0 ? 0 : 1); |
190 | 6 | } Unexecuted instantiation: _ZN5doris10vectorized8SignImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized8SignImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized8SignImplIsE5applyEs _ZN5doris10vectorized8SignImplIiE5applyEi Line | Count | Source | 183 | 3 | static inline UInt8 apply(A a) { | 184 | 3 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) | 185 | 0 | return static_cast<UInt8>(a < A(0) ? -1 : a == A(0) ? 0 : 1); | 186 | 3 | else if constexpr (std::is_signed_v<A>) | 187 | 3 | return static_cast<UInt8>(a < 0 ? -1 : a == 0 ? 0 : 1); | 188 | 3 | else if constexpr (std::is_unsigned_v<A>) | 189 | 3 | return static_cast<UInt8>(a == 0 ? 0 : 1); | 190 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized8SignImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized8SignImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized8SignImplIfE5applyEf _ZN5doris10vectorized8SignImplIdE5applyEd Line | Count | Source | 183 | 3 | static inline UInt8 apply(A a) { | 184 | 3 | if constexpr (IsDecimalNumber<A> || std::is_floating_point_v<A>) | 185 | 3 | return static_cast<UInt8>(a < A(0) ? -1 : a == A(0) ? 0 : 1); | 186 | 3 | else if constexpr (std::is_signed_v<A>) | 187 | 3 | return static_cast<UInt8>(a < 0 ? -1 : a == 0 ? 0 : 1); | 188 | 3 | else if constexpr (std::is_unsigned_v<A>) | 189 | 3 | return static_cast<UInt8>(a == 0 ? 0 : 1); | 190 | 3 | } |
|
191 | | }; |
192 | | |
193 | | struct NameSign { |
194 | | static constexpr auto name = "sign"; |
195 | | }; |
196 | | using FunctionSign = FunctionUnaryArithmetic<SignImpl, NameSign>; |
197 | | |
198 | | template <typename A> |
199 | | struct AbsImpl { |
200 | | static constexpr PrimitiveType ResultType = NumberTraits::ResultOfAbs<A>::Type; |
201 | | |
202 | 12 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { |
203 | 12 | if constexpr (IsDecimalNumber<A>) |
204 | 0 | return a < A(0) ? A(-a) : a; |
205 | 12 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) |
206 | 7 | return a < A(0) ? static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( |
207 | 3 | ~a) + |
208 | 3 | 1 |
209 | 5 | : a; |
210 | 5 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) |
211 | 0 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); |
212 | 5 | else if constexpr (std::is_floating_point_v<A>) |
213 | 5 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( |
214 | 5 | std::abs(a)); |
215 | 12 | } Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIsE5applyEs _ZN5doris10vectorized7AbsImplIiE5applyEi Line | Count | Source | 202 | 7 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 203 | 7 | if constexpr (IsDecimalNumber<A>) | 204 | 0 | return a < A(0) ? A(-a) : a; | 205 | 7 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) | 206 | 7 | return a < A(0) ? static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( | 207 | 3 | ~a) + | 208 | 3 | 1 | 209 | 7 | : a; | 210 | 7 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) | 211 | 7 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); | 212 | 7 | else if constexpr (std::is_floating_point_v<A>) | 213 | 7 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( | 214 | 7 | std::abs(a)); | 215 | 7 | } |
Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized7AbsImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized7AbsImplIfE5applyEf _ZN5doris10vectorized7AbsImplIdE5applyEd Line | Count | Source | 202 | 5 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 203 | 5 | if constexpr (IsDecimalNumber<A>) | 204 | 0 | return a < A(0) ? A(-a) : a; | 205 | 5 | else if constexpr (std::is_integral_v<A> && std::is_signed_v<A>) | 206 | 0 | return a < A(0) ? static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( | 207 | 5 | ~a) + | 208 | 5 | 1 | 209 | 5 | : a; | 210 | 5 | else if constexpr (std::is_integral_v<A> && std::is_unsigned_v<A>) | 211 | 0 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); | 212 | 5 | else if constexpr (std::is_floating_point_v<A>) | 213 | 5 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( | 214 | 5 | std::abs(a)); | 215 | 5 | } |
Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIiEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIlEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized7AbsImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
216 | | }; |
217 | | |
218 | | struct NameAbs { |
219 | | static constexpr auto name = "abs"; |
220 | | }; |
221 | | |
222 | | template <typename A> |
223 | | struct ResultOfUnaryFunc; |
224 | | |
225 | | template <> |
226 | | struct ResultOfUnaryFunc<UInt8> { |
227 | | static constexpr PrimitiveType ResultType = TYPE_BOOLEAN; |
228 | | }; |
229 | | |
230 | | template <> |
231 | | struct ResultOfUnaryFunc<Int8> { |
232 | | static constexpr PrimitiveType ResultType = TYPE_TINYINT; |
233 | | }; |
234 | | |
235 | | template <> |
236 | | struct ResultOfUnaryFunc<Int16> { |
237 | | static constexpr PrimitiveType ResultType = TYPE_SMALLINT; |
238 | | }; |
239 | | |
240 | | template <> |
241 | | struct ResultOfUnaryFunc<Int32> { |
242 | | static constexpr PrimitiveType ResultType = TYPE_INT; |
243 | | }; |
244 | | |
245 | | template <> |
246 | | struct ResultOfUnaryFunc<Int64> { |
247 | | static constexpr PrimitiveType ResultType = TYPE_BIGINT; |
248 | | }; |
249 | | |
250 | | template <> |
251 | | struct ResultOfUnaryFunc<Int128> { |
252 | | static constexpr PrimitiveType ResultType = TYPE_LARGEINT; |
253 | | }; |
254 | | |
255 | | template <> |
256 | | struct ResultOfUnaryFunc<Decimal32> { |
257 | | static constexpr PrimitiveType ResultType = TYPE_DECIMAL32; |
258 | | }; |
259 | | |
260 | | template <> |
261 | | struct ResultOfUnaryFunc<Decimal64> { |
262 | | static constexpr PrimitiveType ResultType = TYPE_DECIMAL64; |
263 | | }; |
264 | | |
265 | | template <> |
266 | | struct ResultOfUnaryFunc<Decimal128V3> { |
267 | | static constexpr PrimitiveType ResultType = TYPE_DECIMAL128I; |
268 | | }; |
269 | | |
270 | | template <> |
271 | | struct ResultOfUnaryFunc<Decimal128V2> { |
272 | | static constexpr PrimitiveType ResultType = TYPE_DECIMALV2; |
273 | | }; |
274 | | |
275 | | template <> |
276 | | struct ResultOfUnaryFunc<Decimal256> { |
277 | | static constexpr PrimitiveType ResultType = TYPE_DECIMAL256; |
278 | | }; |
279 | | |
280 | | template <> |
281 | | struct ResultOfUnaryFunc<float> { |
282 | | static constexpr PrimitiveType ResultType = TYPE_FLOAT; |
283 | | }; |
284 | | |
285 | | template <> |
286 | | struct ResultOfUnaryFunc<double> { |
287 | | static constexpr PrimitiveType ResultType = TYPE_DOUBLE; |
288 | | }; |
289 | | |
290 | | using FunctionAbs = FunctionUnaryArithmetic<AbsImpl, NameAbs>; |
291 | | |
292 | | template <typename A> |
293 | | struct NegativeImpl { |
294 | | static constexpr PrimitiveType ResultType = ResultOfUnaryFunc<A>::ResultType; |
295 | | |
296 | 8 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { return -a; } Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIsE5applyEs _ZN5doris10vectorized12NegativeImplIiE5applyEi Line | Count | Source | 296 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { return -a; } |
Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplIfE5applyEf _ZN5doris10vectorized12NegativeImplIdE5applyEd Line | Count | Source | 296 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { return -a; } |
Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIiEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIlEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized12NegativeImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
297 | | }; |
298 | | |
299 | | struct NameNegative { |
300 | | static constexpr auto name = "negative"; |
301 | | }; |
302 | | |
303 | | using FunctionNegative = FunctionUnaryArithmetic<NegativeImpl, NameNegative>; |
304 | | |
305 | | template <typename A> |
306 | | struct PositiveImpl { |
307 | | static constexpr PrimitiveType ResultType = ResultOfUnaryFunc<A>::ResultType; |
308 | | |
309 | 12 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { |
310 | 12 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); |
311 | 12 | } Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIsE5applyEs _ZN5doris10vectorized12PositiveImplIiE5applyEi Line | Count | Source | 309 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 310 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); | 311 | 4 | } |
Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplIfE5applyEf _ZN5doris10vectorized12PositiveImplIdE5applyEd Line | Count | Source | 309 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 310 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); | 311 | 4 | } |
Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalIiEEE5applyES3_ _ZN5doris10vectorized12PositiveImplINS0_7DecimalIlEEE5applyES3_ Line | Count | Source | 309 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 310 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a); | 311 | 4 | } |
Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalInEEE5applyES3_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_12Decimal128V3EE5applyES2_ Unexecuted instantiation: _ZN5doris10vectorized12PositiveImplINS0_7DecimalIN4wide7integerILm256EiEEEEE5applyES6_ |
312 | | }; |
313 | | |
314 | | struct NamePositive { |
315 | | static constexpr auto name = "positive"; |
316 | | }; |
317 | | |
318 | | using FunctionPositive = FunctionUnaryArithmetic<PositiveImpl, NamePositive>; |
319 | | |
320 | | struct UnaryFunctionPlainSin { |
321 | | using Type = DataTypeFloat64; |
322 | | static constexpr auto name = "sin"; |
323 | | using FuncType = double (*)(double); |
324 | | |
325 | 1 | static FuncType get_sin_func() { |
326 | | #ifndef BE_TEST |
327 | | void* handle = dlopen("libm.so.6", RTLD_LAZY); |
328 | | if (handle) { |
329 | | if (auto sin_func = (double (*)(double))dlsym(handle, "sin"); sin_func) { |
330 | | return sin_func; |
331 | | } |
332 | | dlclose(handle); |
333 | | } |
334 | | #endif |
335 | 1 | return std::sin; |
336 | 1 | } |
337 | | |
338 | 5 | static void execute(const double* src, double* dst) { |
339 | 5 | static auto sin_func = get_sin_func(); |
340 | 5 | *dst = sin_func(*src); |
341 | 5 | } |
342 | | }; |
343 | | |
344 | | using FunctionSin = FunctionMathUnary<UnaryFunctionPlainSin>; |
345 | | |
346 | | struct SinhName { |
347 | | static constexpr auto name = "sinh"; |
348 | | }; |
349 | | using FunctionSinh = FunctionMathUnary<UnaryFunctionPlain<SinhName, std::sinh>>; |
350 | | |
351 | | struct SqrtName { |
352 | | static constexpr auto name = "sqrt"; |
353 | | // https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html#function_sqrt |
354 | 4 | static constexpr bool is_invalid_input(Float64 x) { return x < 0; } |
355 | | }; |
356 | | using FunctionSqrt = |
357 | | FunctionMathUnaryAlwayNullable<UnaryFunctionPlainAlwayNullable<SqrtName, std::sqrt>>; |
358 | | |
359 | | struct CbrtName { |
360 | | static constexpr auto name = "cbrt"; |
361 | | }; |
362 | | using FunctionCbrt = FunctionMathUnary<UnaryFunctionPlain<CbrtName, std::cbrt>>; |
363 | | |
364 | | struct TanName { |
365 | | static constexpr auto name = "tan"; |
366 | | }; |
367 | | using FunctionTan = FunctionMathUnary<UnaryFunctionPlain<TanName, std::tan>>; |
368 | | |
369 | | struct TanhName { |
370 | | static constexpr auto name = "tanh"; |
371 | | }; |
372 | | using FunctionTanh = FunctionMathUnary<UnaryFunctionPlain<TanhName, std::tanh>>; |
373 | | |
374 | | template <typename A> |
375 | | struct RadiansImpl { |
376 | | static constexpr PrimitiveType ResultType = ResultOfUnaryFunc<A>::ResultType; |
377 | | |
378 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { |
379 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( |
380 | 4 | a * PiImpl::value / 180.0); |
381 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIsE5applyEs Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIiE5applyEi Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized11RadiansImplIfE5applyEf _ZN5doris10vectorized11RadiansImplIdE5applyEd Line | Count | Source | 378 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 379 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>( | 380 | 4 | a * PiImpl::value / 180.0); | 381 | 4 | } |
|
382 | | }; |
383 | | |
384 | | struct NameRadians { |
385 | | static constexpr auto name = "radians"; |
386 | | }; |
387 | | |
388 | | using FunctionRadians = FunctionUnaryArithmetic<RadiansImpl, NameRadians>; |
389 | | |
390 | | template <typename A> |
391 | | struct DegreesImpl { |
392 | | static constexpr PrimitiveType ResultType = ResultOfUnaryFunc<A>::ResultType; |
393 | | |
394 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { |
395 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a * 180.0 / |
396 | 4 | PiImpl::value); |
397 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIhE5applyEh Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIaE5applyEa Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIsE5applyEs Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIiE5applyEi Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIlE5applyEl Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplInE5applyEn Unexecuted instantiation: _ZN5doris10vectorized11DegreesImplIfE5applyEf _ZN5doris10vectorized11DegreesImplIdE5applyEd Line | Count | Source | 394 | 4 | static inline typename PrimitiveTypeTraits<ResultType>::ColumnItemType apply(A a) { | 395 | 4 | return static_cast<typename PrimitiveTypeTraits<ResultType>::ColumnItemType>(a * 180.0 / | 396 | 4 | PiImpl::value); | 397 | 4 | } |
|
398 | | }; |
399 | | |
400 | | struct NameDegrees { |
401 | | static constexpr auto name = "degrees"; |
402 | | }; |
403 | | |
404 | | using FunctionDegrees = FunctionUnaryArithmetic<DegreesImpl, NameDegrees>; |
405 | | |
406 | | struct NameBin { |
407 | | static constexpr auto name = "bin"; |
408 | | }; |
409 | | struct BinImpl { |
410 | | using ReturnType = DataTypeString; |
411 | | static constexpr auto PrimitiveTypeImpl = PrimitiveType::TYPE_BIGINT; |
412 | | using Type = Int64; |
413 | | using ReturnColumnType = ColumnString; |
414 | | |
415 | 4 | static std::string bin_impl(Int64 value) { |
416 | 4 | uint64_t n = static_cast<uint64_t>(value); |
417 | 4 | const size_t max_bits = sizeof(uint64_t) * 8; |
418 | 4 | char result[max_bits]; |
419 | 4 | uint32_t index = max_bits; |
420 | 7 | do { |
421 | 7 | result[--index] = '0' + (n & 1); |
422 | 7 | } while (n >>= 1); |
423 | 4 | return std::string(result + index, max_bits - index); |
424 | 4 | } |
425 | | |
426 | | static Status vector(const ColumnInt64::Container& data, ColumnString::Chars& res_data, |
427 | 1 | ColumnString::Offsets& res_offsets) { |
428 | 1 | res_offsets.resize(data.size()); |
429 | 1 | size_t input_size = res_offsets.size(); |
430 | | |
431 | 5 | for (size_t i = 0; i < input_size; ++i) { |
432 | 4 | StringOP::push_value_string(bin_impl(data[i]), i, res_data, res_offsets); |
433 | 4 | } |
434 | 1 | return Status::OK(); |
435 | 1 | } |
436 | | }; |
437 | | |
438 | | using FunctionBin = FunctionUnaryToType<BinImpl, NameBin>; |
439 | | |
440 | | template <PrimitiveType AType, PrimitiveType BType> |
441 | | struct PowImpl { |
442 | | using A = typename PrimitiveTypeTraits<AType>::ColumnItemType; |
443 | | using B = typename PrimitiveTypeTraits<BType>::ColumnItemType; |
444 | | static constexpr PrimitiveType ResultType = TYPE_DOUBLE; |
445 | | static const constexpr bool allow_decimal = false; |
446 | | |
447 | | template <PrimitiveType type> |
448 | 4 | static inline double apply(A a, B b) { |
449 | | /// Next everywhere, static_cast - so that there is no wrong result in expressions of the form Int64 c = UInt32(a) * Int32(-1). |
450 | 4 | return std::pow((double)a, (double)b); |
451 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_2EE5applyILS2_9EEEdhh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_3EE5applyILS2_9EEEdha Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_4EE5applyILS2_9EEEdhs Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_5EE5applyILS2_9EEEdhi Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_6EE5applyILS2_9EEEdhl Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_7EE5applyILS2_9EEEdhn Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_8EE5applyILS2_9EEEdhf Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE2ELS2_9EE5applyILS2_9EEEdhd Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_2EE5applyILS2_9EEEdah Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_3EE5applyILS2_9EEEdaa Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_4EE5applyILS2_9EEEdas Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_5EE5applyILS2_9EEEdai Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_6EE5applyILS2_9EEEdal Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_7EE5applyILS2_9EEEdan Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_8EE5applyILS2_9EEEdaf Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE3ELS2_9EE5applyILS2_9EEEdad Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_2EE5applyILS2_9EEEdsh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_3EE5applyILS2_9EEEdsa Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_4EE5applyILS2_9EEEdss Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_5EE5applyILS2_9EEEdsi Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_6EE5applyILS2_9EEEdsl Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_7EE5applyILS2_9EEEdsn Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_8EE5applyILS2_9EEEdsf Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE4ELS2_9EE5applyILS2_9EEEdsd Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_2EE5applyILS2_9EEEdih Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_3EE5applyILS2_9EEEdia Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_4EE5applyILS2_9EEEdis Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_5EE5applyILS2_9EEEdii Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_6EE5applyILS2_9EEEdil Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_7EE5applyILS2_9EEEdin Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_8EE5applyILS2_9EEEdif Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE5ELS2_9EE5applyILS2_9EEEdid Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_2EE5applyILS2_9EEEdlh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_3EE5applyILS2_9EEEdla Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_4EE5applyILS2_9EEEdls Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_5EE5applyILS2_9EEEdli Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_6EE5applyILS2_9EEEdll Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_7EE5applyILS2_9EEEdln Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_8EE5applyILS2_9EEEdlf Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE6ELS2_9EE5applyILS2_9EEEdld Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_2EE5applyILS2_9EEEdnh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_3EE5applyILS2_9EEEdna Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_4EE5applyILS2_9EEEdns Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_5EE5applyILS2_9EEEdni Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_6EE5applyILS2_9EEEdnl Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_7EE5applyILS2_9EEEdnn Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_8EE5applyILS2_9EEEdnf Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE7ELS2_9EE5applyILS2_9EEEdnd Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_2EE5applyILS2_9EEEdfh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_3EE5applyILS2_9EEEdfa Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_4EE5applyILS2_9EEEdfs Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_5EE5applyILS2_9EEEdfi Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_6EE5applyILS2_9EEEdfl Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_7EE5applyILS2_9EEEdfn Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_8EE5applyILS2_9EEEdff Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE8ELS2_9EE5applyILS2_9EEEdfd Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_2EE5applyILS2_9EEEddh Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_3EE5applyILS2_9EEEdda Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_4EE5applyILS2_9EEEdds Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_5EE5applyILS2_9EEEddi Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_6EE5applyILS2_9EEEddl Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_7EE5applyILS2_9EEEddn Unexecuted instantiation: _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_8EE5applyILS2_9EEEddf _ZN5doris10vectorized7PowImplILNS_13PrimitiveTypeE9ELS2_9EE5applyILS2_9EEEddd Line | Count | Source | 448 | 4 | static inline double apply(A a, B b) { | 449 | | /// Next everywhere, static_cast - so that there is no wrong result in expressions of the form Int64 c = UInt32(a) * Int32(-1). | 450 | 4 | return std::pow((double)a, (double)b); | 451 | 4 | } |
|
452 | | }; |
453 | | struct PowName { |
454 | | static constexpr auto name = "pow"; |
455 | | }; |
456 | | using FunctionPow = FunctionBinaryArithmetic<PowImpl, PowName, false>; |
457 | | |
458 | | class FunctionNormalCdf : public IFunction { |
459 | | public: |
460 | | static constexpr auto name = "normal_cdf"; |
461 | | |
462 | 1 | String get_name() const override { return name; } |
463 | | |
464 | 2 | static FunctionPtr create() { return std::make_shared<FunctionNormalCdf>(); } |
465 | | |
466 | 0 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { |
467 | 0 | return make_nullable(std::make_shared<DataTypeFloat64>()); |
468 | 0 | } |
469 | | |
470 | 1 | DataTypes get_variadic_argument_types_impl() const override { |
471 | 1 | return {std::make_shared<DataTypeFloat64>(), std::make_shared<DataTypeFloat64>(), |
472 | 1 | std::make_shared<DataTypeFloat64>()}; |
473 | 1 | } |
474 | 0 | size_t get_number_of_arguments() const override { return 3; } |
475 | | |
476 | | Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
477 | 0 | uint32_t result, size_t input_rows_count) const override { |
478 | 0 | auto result_column = ColumnFloat64::create(input_rows_count); |
479 | 0 | auto result_null_map_column = ColumnUInt8::create(input_rows_count, 0); |
480 | |
|
481 | 0 | auto& result_data = result_column->get_data(); |
482 | 0 | NullMap& result_null_map = |
483 | 0 | assert_cast<ColumnUInt8*>(result_null_map_column.get())->get_data(); |
484 | |
|
485 | 0 | ColumnPtr argument_columns[3]; |
486 | 0 | bool col_const[3]; |
487 | 0 | size_t argument_size = arguments.size(); |
488 | 0 | for (int i = 0; i < argument_size; ++i) { |
489 | 0 | argument_columns[i] = block.get_by_position(arguments[i]).column; |
490 | 0 | col_const[i] = is_column_const(*argument_columns[i]); |
491 | 0 | if (col_const[i]) { |
492 | 0 | argument_columns[i] = |
493 | 0 | static_cast<const ColumnConst&>(*argument_columns[i]).get_data_column_ptr(); |
494 | 0 | } |
495 | 0 | } |
496 | |
|
497 | 0 | auto* mean_col = assert_cast<const ColumnFloat64*>(argument_columns[0].get()); |
498 | 0 | auto* sd_col = assert_cast<const ColumnFloat64*>(argument_columns[1].get()); |
499 | 0 | auto* value_col = assert_cast<const ColumnFloat64*>(argument_columns[2].get()); |
500 | |
|
501 | 0 | result_column->reserve(input_rows_count); |
502 | 0 | for (size_t i = 0; i < input_rows_count; ++i) { |
503 | 0 | double mean = mean_col->get_element(index_check_const(i, col_const[0])); |
504 | 0 | double sd = sd_col->get_element(index_check_const(i, col_const[1])); |
505 | 0 | double v = value_col->get_element(index_check_const(i, col_const[2])); |
506 | |
|
507 | 0 | if (!check_argument(sd)) [[unlikely]] { |
508 | 0 | result_null_map[i] = true; |
509 | 0 | continue; |
510 | 0 | } |
511 | 0 | result_data[i] = calculate_cell(mean, sd, v); |
512 | 0 | } |
513 | |
|
514 | 0 | block.get_by_position(result).column = |
515 | 0 | ColumnNullable::create(std::move(result_column), std::move(result_null_map_column)); |
516 | 0 | return Status::OK(); |
517 | 0 | } |
518 | | |
519 | 0 | static bool check_argument(double sd) { return sd > 0; } |
520 | 0 | static double calculate_cell(double mean, double sd, double v) { |
521 | | #ifdef __APPLE__ |
522 | | const double sqrt2 = std::sqrt(2); |
523 | | #else |
524 | 0 | constexpr double sqrt2 = std::numbers::sqrt2; |
525 | 0 | #endif |
526 | |
|
527 | 0 | return 0.5 * (std::erf((v - mean) / (sd * sqrt2)) + 1); |
528 | 0 | } |
529 | | }; |
530 | | |
531 | | // TODO: Now math may cause one thread compile time too long, because the function in math |
532 | | // so mush. Split it to speed up compile time in the future |
533 | 1 | void register_function_math(SimpleFunctionFactory& factory) { |
534 | 1 | factory.register_function<FunctionAcos>(); |
535 | 1 | factory.register_function<FunctionAcosh>(); |
536 | 1 | factory.register_function<FunctionAsin>(); |
537 | 1 | factory.register_function<FunctionAsinh>(); |
538 | 1 | factory.register_function<FunctionAtan>(); |
539 | 1 | factory.register_function<FunctionAtanh>(); |
540 | 1 | factory.register_function<FunctionAtan2>(); |
541 | 1 | factory.register_function<FunctionCos>(); |
542 | 1 | factory.register_function<FunctionCosh>(); |
543 | 1 | factory.register_function<FunctionE>(); |
544 | 1 | factory.register_alias("ln", "dlog1"); |
545 | 1 | factory.register_function<FunctionLog>(); |
546 | 1 | factory.register_function<FunctionMathLog<ImplLn>>(); |
547 | 1 | factory.register_function<FunctionMathLog<ImplLog2>>(); |
548 | 1 | factory.register_function<FunctionMathLog<ImplLog10>>(); |
549 | 1 | factory.register_alias("log10", "dlog10"); |
550 | 1 | factory.register_function<FunctionPi>(); |
551 | 1 | factory.register_function<FunctionSign>(); |
552 | 1 | factory.register_function<FunctionAbs>(); |
553 | 1 | factory.register_function<FunctionNegative>(); |
554 | 1 | factory.register_function<FunctionPositive>(); |
555 | 1 | factory.register_function<FunctionSin>(); |
556 | 1 | factory.register_function<FunctionSinh>(); |
557 | 1 | factory.register_function<FunctionSqrt>(); |
558 | 1 | factory.register_alias("sqrt", "dsqrt"); |
559 | 1 | factory.register_function<FunctionCbrt>(); |
560 | 1 | factory.register_function<FunctionTan>(); |
561 | 1 | factory.register_function<FunctionTanh>(); |
562 | 1 | factory.register_function<FunctionPow>(); |
563 | 1 | factory.register_alias("pow", "power"); |
564 | 1 | factory.register_alias("pow", "dpow"); |
565 | 1 | factory.register_alias("pow", "fpow"); |
566 | 1 | factory.register_function<FunctionExp>(); |
567 | 1 | factory.register_alias("exp", "dexp"); |
568 | 1 | factory.register_function<FunctionRadians>(); |
569 | 1 | factory.register_function<FunctionDegrees>(); |
570 | 1 | factory.register_function<FunctionBin>(); |
571 | 1 | factory.register_function<FunctionNormalCdf>(); |
572 | 1 | } |
573 | | } // namespace doris::vectorized |