be/src/exprs/function/array/function_array_index.h
Line | Count | Source |
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 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/array/arrayIndex.h |
19 | | // and modified by Doris |
20 | | #pragma once |
21 | | |
22 | | #include <stddef.h> |
23 | | |
24 | | #include <memory> |
25 | | #include <utility> |
26 | | |
27 | | #include "common/status.h" |
28 | | #include "core/assert_cast.h" |
29 | | #include "core/block/block.h" |
30 | | #include "core/block/column_numbers.h" |
31 | | #include "core/block/column_with_type_and_name.h" |
32 | | #include "core/call_on_type_index.h" |
33 | | #include "core/column/column.h" |
34 | | #include "core/column/column_array.h" |
35 | | #include "core/column/column_nullable.h" |
36 | | #include "core/column/column_string.h" |
37 | | #include "core/column/column_vector.h" |
38 | | #include "core/data_type/data_type.h" |
39 | | #include "core/data_type/data_type_array.h" |
40 | | #include "core/data_type/data_type_nullable.h" |
41 | | #include "core/data_type/data_type_number.h" // IWYU pragma: keep |
42 | | #include "core/data_type/define_primitive_type.h" |
43 | | #include "core/data_type/primitive_type.h" |
44 | | #include "core/string_ref.h" |
45 | | #include "core/types.h" |
46 | | #include "exprs/function/function.h" |
47 | | #include "storage/index/index_reader_helper.h" |
48 | | #include "storage/index/inverted/inverted_index_query_type.h" |
49 | | #include "storage/index/inverted/inverted_index_reader.h" |
50 | | #include "storage/predicate/column_predicate.h" |
51 | | |
52 | | namespace doris { |
53 | | class FunctionContext; |
54 | | } // namespace doris |
55 | | |
56 | | namespace doris { |
57 | | |
58 | | struct ArrayContainsAction { |
59 | | static constexpr auto ResultType = PrimitiveType::TYPE_BOOLEAN; |
60 | | static constexpr auto name = "array_contains"; |
61 | | static constexpr const bool resume_execution = false; |
62 | | static constexpr void apply(typename PrimitiveTypeTraits<ResultType>::CppType& current, |
63 | 10 | size_t) noexcept { |
64 | 10 | current = 1; |
65 | 10 | } |
66 | | }; |
67 | | |
68 | | struct ArrayPositionAction { |
69 | | static constexpr auto ResultType = PrimitiveType::TYPE_BIGINT; |
70 | | static constexpr auto name = "array_position"; |
71 | | static constexpr const bool resume_execution = false; |
72 | | static constexpr void apply(typename PrimitiveTypeTraits<ResultType>::CppType& current, |
73 | 7 | size_t j) noexcept { |
74 | 7 | current = j + 1; |
75 | 7 | } |
76 | | }; |
77 | | |
78 | | struct ArrayCountEqual { |
79 | | static constexpr auto ResultType = PrimitiveType::TYPE_BIGINT; |
80 | | static constexpr auto name = "countequal"; |
81 | | static constexpr const bool resume_execution = true; |
82 | | static constexpr void apply(typename PrimitiveTypeTraits<ResultType>::CppType& current, |
83 | 0 | size_t j) noexcept { |
84 | 0 | ++current; |
85 | 0 | } |
86 | | }; |
87 | | |
88 | | struct ParamValue { |
89 | | PrimitiveType type; |
90 | | Field value; |
91 | | }; |
92 | | |
93 | | template <typename ConcreteAction> |
94 | | class FunctionArrayIndex : public IFunction { |
95 | | public: |
96 | | static constexpr auto ResultType = ConcreteAction::ResultType; |
97 | | |
98 | | static constexpr auto name = ConcreteAction::name; |
99 | 19 | static FunctionPtr create() { return std::make_shared<FunctionArrayIndex>(); }_ZN5doris18FunctionArrayIndexINS_19ArrayContainsActionEE6createEv Line | Count | Source | 99 | 10 | static FunctionPtr create() { return std::make_shared<FunctionArrayIndex>(); } |
_ZN5doris18FunctionArrayIndexINS_19ArrayPositionActionEE6createEv Line | Count | Source | 99 | 7 | static FunctionPtr create() { return std::make_shared<FunctionArrayIndex>(); } |
_ZN5doris18FunctionArrayIndexINS_15ArrayCountEqualEE6createEv Line | Count | Source | 99 | 2 | static FunctionPtr create() { return std::make_shared<FunctionArrayIndex>(); } |
|
100 | | |
101 | | /// Get function name. |
102 | 3 | String get_name() const override { return name; }_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE8get_nameB5cxx11Ev Line | Count | Source | 102 | 1 | String get_name() const override { return name; } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE8get_nameB5cxx11Ev Line | Count | Source | 102 | 1 | String get_name() const override { return name; } |
_ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE8get_nameB5cxx11Ev Line | Count | Source | 102 | 1 | String get_name() const override { return name; } |
|
103 | | |
104 | 16 | bool is_variadic() const override { return false; }_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE11is_variadicEv Line | Count | Source | 104 | 9 | bool is_variadic() const override { return false; } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE11is_variadicEv Line | Count | Source | 104 | 6 | bool is_variadic() const override { return false; } |
_ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE11is_variadicEv Line | Count | Source | 104 | 1 | bool is_variadic() const override { return false; } |
|
105 | | |
106 | 13 | size_t get_number_of_arguments() const override { return 2; }_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE23get_number_of_argumentsEv Line | Count | Source | 106 | 8 | size_t get_number_of_arguments() const override { return 2; } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE23get_number_of_argumentsEv Line | Count | Source | 106 | 5 | size_t get_number_of_arguments() const override { return 2; } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE23get_number_of_argumentsEv |
107 | | |
108 | 26 | bool use_default_implementation_for_nulls() const override { return false; }_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE36use_default_implementation_for_nullsEv Line | Count | Source | 108 | 16 | bool use_default_implementation_for_nulls() const override { return false; } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE36use_default_implementation_for_nullsEv Line | Count | Source | 108 | 10 | bool use_default_implementation_for_nulls() const override { return false; } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE36use_default_implementation_for_nullsEv |
109 | | |
110 | 26 | Status open(FunctionContext* context, FunctionContext::FunctionStateScope scope) override { |
111 | 26 | if (scope == FunctionContext::THREAD_LOCAL) { |
112 | 13 | return Status::OK(); |
113 | 13 | } |
114 | | |
115 | 26 | DCHECK(context->get_num_args() >= 1); |
116 | 13 | DCHECK_EQ(context->get_arg_type(0)->get_primitive_type(), PrimitiveType::TYPE_ARRAY); |
117 | | // now we only support same |
118 | 13 | std::shared_ptr<ParamValue> state = std::make_shared<ParamValue>(); |
119 | 13 | Field field; |
120 | 13 | if (context->get_constant_col(1)) { |
121 | 0 | context->get_constant_col(1)->column_ptr->get(0, field); |
122 | 0 | state->value = field; |
123 | 0 | state->type = context->get_arg_type(1)->get_primitive_type(); |
124 | 0 | context->set_function_state(scope, state); |
125 | 0 | } |
126 | 13 | return Status::OK(); |
127 | 26 | } _ZN5doris18FunctionArrayIndexINS_19ArrayContainsActionEE4openEPNS_15FunctionContextENS3_18FunctionStateScopeE Line | Count | Source | 110 | 16 | Status open(FunctionContext* context, FunctionContext::FunctionStateScope scope) override { | 111 | 16 | if (scope == FunctionContext::THREAD_LOCAL) { | 112 | 8 | return Status::OK(); | 113 | 8 | } | 114 | | | 115 | 16 | DCHECK(context->get_num_args() >= 1); | 116 | 8 | DCHECK_EQ(context->get_arg_type(0)->get_primitive_type(), PrimitiveType::TYPE_ARRAY); | 117 | | // now we only support same | 118 | 8 | std::shared_ptr<ParamValue> state = std::make_shared<ParamValue>(); | 119 | 8 | Field field; | 120 | 8 | if (context->get_constant_col(1)) { | 121 | 0 | context->get_constant_col(1)->column_ptr->get(0, field); | 122 | 0 | state->value = field; | 123 | 0 | state->type = context->get_arg_type(1)->get_primitive_type(); | 124 | 0 | context->set_function_state(scope, state); | 125 | 0 | } | 126 | 8 | return Status::OK(); | 127 | 16 | } |
_ZN5doris18FunctionArrayIndexINS_19ArrayPositionActionEE4openEPNS_15FunctionContextENS3_18FunctionStateScopeE Line | Count | Source | 110 | 10 | Status open(FunctionContext* context, FunctionContext::FunctionStateScope scope) override { | 111 | 10 | if (scope == FunctionContext::THREAD_LOCAL) { | 112 | 5 | return Status::OK(); | 113 | 5 | } | 114 | | | 115 | 10 | DCHECK(context->get_num_args() >= 1); | 116 | 5 | DCHECK_EQ(context->get_arg_type(0)->get_primitive_type(), PrimitiveType::TYPE_ARRAY); | 117 | | // now we only support same | 118 | 5 | std::shared_ptr<ParamValue> state = std::make_shared<ParamValue>(); | 119 | 5 | Field field; | 120 | 5 | if (context->get_constant_col(1)) { | 121 | 0 | context->get_constant_col(1)->column_ptr->get(0, field); | 122 | 0 | state->value = field; | 123 | 0 | state->type = context->get_arg_type(1)->get_primitive_type(); | 124 | 0 | context->set_function_state(scope, state); | 125 | 0 | } | 126 | 5 | return Status::OK(); | 127 | 10 | } |
Unexecuted instantiation: _ZN5doris18FunctionArrayIndexINS_15ArrayCountEqualEE4openEPNS_15FunctionContextENS3_18FunctionStateScopeE |
128 | | |
129 | | Status evaluate_inverted_index( |
130 | | const ColumnsWithTypeAndName& arguments, |
131 | | const std::vector<IndexFieldNameAndTypePair>& data_type_with_names, |
132 | | std::vector<segment_v2::IndexIterator*> iterators, uint32_t num_rows, |
133 | | const InvertedIndexAnalyzerCtx* analyzer_ctx, |
134 | 0 | segment_v2::InvertedIndexResultBitmap& bitmap_result) const override { |
135 | 0 | DCHECK(arguments.size() == 1); |
136 | 0 | DCHECK(data_type_with_names.size() == 1); |
137 | 0 | DCHECK(iterators.size() == 1); |
138 | 0 | auto* iter = iterators[0]; |
139 | 0 | auto data_type_with_name = data_type_with_names[0]; |
140 | 0 | if (iter == nullptr) { |
141 | 0 | return Status::OK(); |
142 | 0 | } |
143 | 0 | if (!segment_v2::IndexReaderHelper::has_string_or_bkd_index(iter)) { |
144 | | // parser is not none we can not make sure the result is correct in expr combination |
145 | | // for example, filter: !array_index(array, 'tall:120cm, weight: 35kg') |
146 | | // here we have rows [tall:120cm, weight: 35kg, hobbies: reading book] which be tokenized |
147 | | // but query is also tokenized, and FULLTEXT reader will catch this row as matched, |
148 | | // so array_index(array, 'tall:120cm, weight: 35kg') return this rowid, |
149 | | // but we expect it to be filtered, because we want row is equal to 'tall:120cm, weight: 35kg' |
150 | 0 | return Status::OK(); |
151 | 0 | } |
152 | 0 | Field param_value; |
153 | 0 | arguments[0].column->get(0, param_value); |
154 | 0 | auto param_type = arguments[0].type->get_primitive_type(); |
155 | | // The current implementation for the inverted index of arrays cannot handle cases where the array contains null values, |
156 | | // meaning an item in the array is null. |
157 | 0 | if (param_value.is_null()) { |
158 | 0 | return Status::OK(); |
159 | 0 | } |
160 | | |
161 | 0 | std::shared_ptr<roaring::Roaring> null_bitmap = std::make_shared<roaring::Roaring>(); |
162 | 0 | if (iter->has_null()) { |
163 | 0 | segment_v2::InvertedIndexQueryCacheHandle null_bitmap_cache_handle; |
164 | 0 | RETURN_IF_ERROR(iter->read_null_bitmap(&null_bitmap_cache_handle)); |
165 | 0 | null_bitmap = null_bitmap_cache_handle.get_bitmap(); |
166 | 0 | } |
167 | 0 | std::unique_ptr<InvertedIndexQueryParamFactory> query_param = nullptr; |
168 | 0 | RETURN_IF_ERROR(InvertedIndexQueryParamFactory::create_query_value(param_type, ¶m_value, |
169 | 0 | query_param)); |
170 | 0 | InvertedIndexParam param; |
171 | 0 | param.column_name = data_type_with_name.first; |
172 | 0 | param.column_type = data_type_with_name.second; |
173 | 0 | param.query_value = query_param->get_value(); |
174 | 0 | param.query_type = segment_v2::InvertedIndexQueryType::EQUAL_QUERY; |
175 | 0 | param.num_rows = num_rows; |
176 | 0 | param.roaring = std::make_shared<roaring::Roaring>(); |
177 | 0 | param.analyzer_ctx = analyzer_ctx; |
178 | 0 | RETURN_IF_ERROR(iter->read_from_index(segment_v2::IndexParam {¶m})); |
179 | | // here debug for check array_contains function really filter rows by inverted index correctly |
180 | 0 | DBUG_EXECUTE_IF("array_func.array_contains", { |
181 | 0 | auto result_bitmap = DebugPoints::instance()->get_debug_param_or_default<int32_t>( |
182 | 0 | "array_func.array_contains", "result_bitmap", 0); |
183 | 0 | if (result_bitmap < 0) { |
184 | 0 | return Status::Error<ErrorCode::INTERNAL_ERROR>( |
185 | 0 | "result_bitmap count cannot be negative"); |
186 | 0 | } |
187 | 0 | if (param.roaring->cardinality() != result_bitmap) { |
188 | 0 | return Status::Error<ErrorCode::INTERNAL_ERROR>( |
189 | 0 | "array_contains really filtered {} by inverted index not equal to expected " |
190 | 0 | "{}", |
191 | 0 | param.roaring->cardinality(), result_bitmap); |
192 | 0 | } |
193 | 0 | }) |
194 | 0 | segment_v2::InvertedIndexResultBitmap result(param.roaring, null_bitmap); |
195 | 0 | bitmap_result = result; |
196 | 0 | bitmap_result.mask_out_null(); |
197 | |
|
198 | 0 | return Status::OK(); |
199 | 0 | } Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE23evaluate_inverted_indexERKSt6vectorINS_21ColumnWithTypeAndNameESaIS4_EERKS3_ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIKNS_9IDataTypeEEESaISK_EES3_IPNS_10segment_v213IndexIteratorESaISR_EEjPKNS_24InvertedIndexAnalyzerCtxERNSP_25InvertedIndexResultBitmapE Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE23evaluate_inverted_indexERKSt6vectorINS_21ColumnWithTypeAndNameESaIS4_EERKS3_ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIKNS_9IDataTypeEEESaISK_EES3_IPNS_10segment_v213IndexIteratorESaISR_EEjPKNS_24InvertedIndexAnalyzerCtxERNSP_25InvertedIndexResultBitmapE Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE23evaluate_inverted_indexERKSt6vectorINS_21ColumnWithTypeAndNameESaIS4_EERKS3_ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIKNS_9IDataTypeEEESaISK_EES3_IPNS_10segment_v213IndexIteratorESaISR_EEjPKNS_24InvertedIndexAnalyzerCtxERNSP_25InvertedIndexResultBitmapE |
200 | | |
201 | 13 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { |
202 | 13 | if (arguments[0]->is_nullable()) { |
203 | 13 | return make_nullable( |
204 | 13 | std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>()); |
205 | 13 | } else { |
206 | 0 | return std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>(); |
207 | 0 | } |
208 | 13 | } _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 201 | 8 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 202 | 8 | if (arguments[0]->is_nullable()) { | 203 | 8 | return make_nullable( | 204 | 8 | std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>()); | 205 | 8 | } else { | 206 | 0 | return std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>(); | 207 | 0 | } | 208 | 8 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 201 | 5 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 202 | 5 | if (arguments[0]->is_nullable()) { | 203 | 5 | return make_nullable( | 204 | 5 | std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>()); | 205 | 5 | } else { | 206 | 0 | return std::make_shared<typename PrimitiveTypeTraits<ResultType>::DataType>(); | 207 | 0 | } | 208 | 5 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE |
209 | | |
210 | | Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
211 | 13 | uint32_t result, size_t input_rows_count) const override { |
212 | 13 | DBUG_EXECUTE_IF("array_func.array_contains", { |
213 | 13 | auto req_id = DebugPoints::instance()->get_debug_param_or_default<int32_t>( |
214 | 13 | "array_func.array_contains", "req_id", 0); |
215 | 13 | return Status::Error<ErrorCode::INTERNAL_ERROR>( |
216 | 13 | "{} has already execute inverted index req_id {} , should not execute expr " |
217 | 13 | "with rows: {}", |
218 | 13 | get_name(), req_id, input_rows_count); |
219 | 13 | }); |
220 | 13 | return _execute_dispatch(block, arguments, result, input_rows_count); |
221 | 13 | } _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 211 | 8 | uint32_t result, size_t input_rows_count) const override { | 212 | 8 | DBUG_EXECUTE_IF("array_func.array_contains", { | 213 | 8 | auto req_id = DebugPoints::instance()->get_debug_param_or_default<int32_t>( | 214 | 8 | "array_func.array_contains", "req_id", 0); | 215 | 8 | return Status::Error<ErrorCode::INTERNAL_ERROR>( | 216 | 8 | "{} has already execute inverted index req_id {} , should not execute expr " | 217 | 8 | "with rows: {}", | 218 | 8 | get_name(), req_id, input_rows_count); | 219 | 8 | }); | 220 | 8 | return _execute_dispatch(block, arguments, result, input_rows_count); | 221 | 8 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 211 | 5 | uint32_t result, size_t input_rows_count) const override { | 212 | 5 | DBUG_EXECUTE_IF("array_func.array_contains", { | 213 | 5 | auto req_id = DebugPoints::instance()->get_debug_param_or_default<int32_t>( | 214 | 5 | "array_func.array_contains", "req_id", 0); | 215 | 5 | return Status::Error<ErrorCode::INTERNAL_ERROR>( | 216 | 5 | "{} has already execute inverted index req_id {} , should not execute expr " | 217 | 5 | "with rows: {}", | 218 | 5 | get_name(), req_id, input_rows_count); | 219 | 5 | }); | 220 | 5 | return _execute_dispatch(block, arguments, result, input_rows_count); | 221 | 5 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm |
222 | | |
223 | | private: |
224 | | ColumnPtr _execute_string(const ColumnArray::Offsets64& offsets, const UInt8* nested_null_map, |
225 | | const IColumn& nested_column, const IColumn& right_column, |
226 | | const UInt8* right_nested_null_map, |
227 | 2 | const UInt8* outer_null_map) const { |
228 | | // check array nested column type and get data |
229 | 2 | const auto& str_offs = reinterpret_cast<const ColumnString&>(nested_column).get_offsets(); |
230 | 2 | const auto& str_chars = reinterpret_cast<const ColumnString&>(nested_column).get_chars(); |
231 | | |
232 | | // check right column type and get data |
233 | 2 | const auto& right_offs = reinterpret_cast<const ColumnString&>(right_column).get_offsets(); |
234 | 2 | const auto& right_chars = reinterpret_cast<const ColumnString&>(right_column).get_chars(); |
235 | | |
236 | | // prepare return data |
237 | 2 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); |
238 | 2 | auto& dst_data = dst->get_data(); |
239 | 2 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); |
240 | 2 | auto& dst_null_data = dst_null_column->get_data(); |
241 | | |
242 | | // process |
243 | 16 | for (size_t row = 0; row < offsets.size(); ++row) { |
244 | 10 | if (outer_null_map && outer_null_map[row]) { |
245 | 2 | dst_null_data[row] = true; |
246 | 2 | continue; |
247 | 2 | } |
248 | 8 | dst_null_data[row] = false; |
249 | 8 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; |
250 | 8 | size_t off = offsets[row - 1]; |
251 | 8 | size_t len = offsets[row] - off; |
252 | | |
253 | 8 | size_t right_off = right_offs[row - 1]; |
254 | 8 | size_t right_len = right_offs[row] - right_off; |
255 | 20 | for (size_t pos = 0; pos < len; ++pos) { |
256 | | // match null value |
257 | 12 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && |
258 | 12 | nested_null_map[pos + off]) { |
259 | 0 | ConcreteAction::apply(res, pos); |
260 | 0 | if constexpr (!ConcreteAction::resume_execution) { |
261 | 0 | break; |
262 | 0 | } |
263 | 0 | } |
264 | | // some is null while another is not |
265 | 12 | if (right_nested_null_map && nested_null_map && |
266 | 12 | right_nested_null_map[row] != nested_null_map[pos + off]) { |
267 | 0 | continue; |
268 | 0 | } |
269 | 12 | if (nested_null_map && nested_null_map[pos + off]) { |
270 | 0 | continue; |
271 | 0 | } |
272 | 12 | size_t str_pos = str_offs[pos + off - 1]; |
273 | 12 | size_t str_len = str_offs[pos + off] - str_pos; |
274 | 12 | const char* left_raw_v = reinterpret_cast<const char*>(&str_chars[str_pos]); |
275 | 12 | const char* right_raw_v = reinterpret_cast<const char*>(&right_chars[right_off]); |
276 | | // StringRef operator == using vec impl |
277 | 12 | if (StringRef(left_raw_v, str_len) == StringRef(right_raw_v, right_len)) { |
278 | 4 | ConcreteAction::apply(res, pos); |
279 | 4 | if constexpr (!ConcreteAction::resume_execution) { |
280 | 4 | break; |
281 | 4 | } |
282 | 4 | } |
283 | 12 | } |
284 | 12 | dst_data[row] = res; |
285 | 12 | } |
286 | | |
287 | 6 | if (outer_null_map == nullptr) { |
288 | 0 | return dst; |
289 | 0 | } |
290 | 6 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); |
291 | 6 | } _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_stringERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKNS_7IColumnESE_SB_SB_ Line | Count | Source | 227 | 1 | const UInt8* outer_null_map) const { | 228 | | // check array nested column type and get data | 229 | 1 | const auto& str_offs = reinterpret_cast<const ColumnString&>(nested_column).get_offsets(); | 230 | 1 | const auto& str_chars = reinterpret_cast<const ColumnString&>(nested_column).get_chars(); | 231 | | | 232 | | // check right column type and get data | 233 | 1 | const auto& right_offs = reinterpret_cast<const ColumnString&>(right_column).get_offsets(); | 234 | 1 | const auto& right_chars = reinterpret_cast<const ColumnString&>(right_column).get_chars(); | 235 | | | 236 | | // prepare return data | 237 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 238 | 1 | auto& dst_data = dst->get_data(); | 239 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 240 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 241 | | | 242 | | // process | 243 | 8 | for (size_t row = 0; row < offsets.size(); ++row) { | 244 | 5 | if (outer_null_map && outer_null_map[row]) { | 245 | 1 | dst_null_data[row] = true; | 246 | 1 | continue; | 247 | 1 | } | 248 | 4 | dst_null_data[row] = false; | 249 | 4 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 250 | 4 | size_t off = offsets[row - 1]; | 251 | 4 | size_t len = offsets[row] - off; | 252 | | | 253 | 4 | size_t right_off = right_offs[row - 1]; | 254 | 4 | size_t right_len = right_offs[row] - right_off; | 255 | 10 | for (size_t pos = 0; pos < len; ++pos) { | 256 | | // match null value | 257 | 6 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 258 | 6 | nested_null_map[pos + off]) { | 259 | 0 | ConcreteAction::apply(res, pos); | 260 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 261 | 0 | break; | 262 | 0 | } | 263 | 0 | } | 264 | | // some is null while another is not | 265 | 6 | if (right_nested_null_map && nested_null_map && | 266 | 6 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 267 | 0 | continue; | 268 | 0 | } | 269 | 6 | if (nested_null_map && nested_null_map[pos + off]) { | 270 | 0 | continue; | 271 | 0 | } | 272 | 6 | size_t str_pos = str_offs[pos + off - 1]; | 273 | 6 | size_t str_len = str_offs[pos + off] - str_pos; | 274 | 6 | const char* left_raw_v = reinterpret_cast<const char*>(&str_chars[str_pos]); | 275 | 6 | const char* right_raw_v = reinterpret_cast<const char*>(&right_chars[right_off]); | 276 | | // StringRef operator == using vec impl | 277 | 6 | if (StringRef(left_raw_v, str_len) == StringRef(right_raw_v, right_len)) { | 278 | 2 | ConcreteAction::apply(res, pos); | 279 | 2 | if constexpr (!ConcreteAction::resume_execution) { | 280 | 2 | break; | 281 | 2 | } | 282 | 2 | } | 283 | 6 | } | 284 | 6 | dst_data[row] = res; | 285 | 6 | } | 286 | | | 287 | 3 | if (outer_null_map == nullptr) { | 288 | 0 | return dst; | 289 | 0 | } | 290 | 3 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 291 | 3 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_stringERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKNS_7IColumnESE_SB_SB_ Line | Count | Source | 227 | 1 | const UInt8* outer_null_map) const { | 228 | | // check array nested column type and get data | 229 | 1 | const auto& str_offs = reinterpret_cast<const ColumnString&>(nested_column).get_offsets(); | 230 | 1 | const auto& str_chars = reinterpret_cast<const ColumnString&>(nested_column).get_chars(); | 231 | | | 232 | | // check right column type and get data | 233 | 1 | const auto& right_offs = reinterpret_cast<const ColumnString&>(right_column).get_offsets(); | 234 | 1 | const auto& right_chars = reinterpret_cast<const ColumnString&>(right_column).get_chars(); | 235 | | | 236 | | // prepare return data | 237 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 238 | 1 | auto& dst_data = dst->get_data(); | 239 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 240 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 241 | | | 242 | | // process | 243 | 8 | for (size_t row = 0; row < offsets.size(); ++row) { | 244 | 5 | if (outer_null_map && outer_null_map[row]) { | 245 | 1 | dst_null_data[row] = true; | 246 | 1 | continue; | 247 | 1 | } | 248 | 4 | dst_null_data[row] = false; | 249 | 4 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 250 | 4 | size_t off = offsets[row - 1]; | 251 | 4 | size_t len = offsets[row] - off; | 252 | | | 253 | 4 | size_t right_off = right_offs[row - 1]; | 254 | 4 | size_t right_len = right_offs[row] - right_off; | 255 | 10 | for (size_t pos = 0; pos < len; ++pos) { | 256 | | // match null value | 257 | 6 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 258 | 6 | nested_null_map[pos + off]) { | 259 | 0 | ConcreteAction::apply(res, pos); | 260 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 261 | 0 | break; | 262 | 0 | } | 263 | 0 | } | 264 | | // some is null while another is not | 265 | 6 | if (right_nested_null_map && nested_null_map && | 266 | 6 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 267 | 0 | continue; | 268 | 0 | } | 269 | 6 | if (nested_null_map && nested_null_map[pos + off]) { | 270 | 0 | continue; | 271 | 0 | } | 272 | 6 | size_t str_pos = str_offs[pos + off - 1]; | 273 | 6 | size_t str_len = str_offs[pos + off] - str_pos; | 274 | 6 | const char* left_raw_v = reinterpret_cast<const char*>(&str_chars[str_pos]); | 275 | 6 | const char* right_raw_v = reinterpret_cast<const char*>(&right_chars[right_off]); | 276 | | // StringRef operator == using vec impl | 277 | 6 | if (StringRef(left_raw_v, str_len) == StringRef(right_raw_v, right_len)) { | 278 | 2 | ConcreteAction::apply(res, pos); | 279 | 2 | if constexpr (!ConcreteAction::resume_execution) { | 280 | 2 | break; | 281 | 2 | } | 282 | 2 | } | 283 | 6 | } | 284 | 6 | dst_data[row] = res; | 285 | 6 | } | 286 | | | 287 | 3 | if (outer_null_map == nullptr) { | 288 | 0 | return dst; | 289 | 0 | } | 290 | 3 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 291 | 3 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_stringERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKNS_7IColumnESE_SB_SB_ |
292 | | |
293 | | template <typename NestedColumnType, typename RightColumnType> |
294 | | ColumnPtr _execute_number(const ColumnArray::Offsets64& offsets, const UInt8* nested_null_map, |
295 | | const IColumn& nested_column, const IColumn& right_column, |
296 | | const UInt8* right_nested_null_map, |
297 | 11 | const UInt8* outer_null_map) const { |
298 | | // check array nested column type and get data |
299 | 11 | const auto& nested_data = |
300 | 11 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); |
301 | | |
302 | | // check right column type and get data |
303 | 11 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); |
304 | | |
305 | | // prepare return data |
306 | 11 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); |
307 | 11 | auto& dst_data = dst->get_data(); |
308 | 11 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); |
309 | 11 | auto& dst_null_data = dst_null_column->get_data(); |
310 | | |
311 | | // process |
312 | 68 | for (size_t row = 0; row < offsets.size(); ++row) { |
313 | 44 | if (outer_null_map && outer_null_map[row]) { |
314 | 11 | dst_null_data[row] = true; |
315 | 11 | continue; |
316 | 11 | } |
317 | 33 | dst_null_data[row] = false; |
318 | 33 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; |
319 | 33 | size_t off = offsets[row - 1]; |
320 | 33 | size_t len = offsets[row] - off; |
321 | 87 | for (size_t pos = 0; pos < len; ++pos) { |
322 | | // match null value |
323 | 54 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && |
324 | 54 | nested_null_map[pos + off]) { |
325 | 0 | ConcreteAction::apply(res, pos); |
326 | 0 | if constexpr (!ConcreteAction::resume_execution) { |
327 | 0 | break; |
328 | 0 | } |
329 | 0 | } |
330 | | // some is null while another is not |
331 | 54 | if (right_nested_null_map && nested_null_map && |
332 | 54 | right_nested_null_map[row] != nested_null_map[pos + off]) { |
333 | 0 | continue; |
334 | 0 | } |
335 | 54 | if (nested_null_map && nested_null_map[pos + off]) { |
336 | 0 | continue; |
337 | 0 | } |
338 | 54 | if (nested_data[pos + off] == right_data[row]) { |
339 | 13 | ConcreteAction::apply(res, pos); |
340 | 13 | if constexpr (!ConcreteAction::resume_execution) { |
341 | 13 | break; |
342 | 13 | } |
343 | 13 | } |
344 | 54 | } |
345 | 46 | dst_data[row] = res; |
346 | 46 | } |
347 | | |
348 | 24 | if (outer_null_map == nullptr) { |
349 | 0 | return dst; |
350 | 0 | } |
351 | 24 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); |
352 | 24 | } Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE2EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE3EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE4EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE5EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE6EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE7EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 7 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 4 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 4 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 4 | if (right_nested_null_map && nested_null_map && | 332 | 4 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 4 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 4 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 4 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE8EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE9EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE28EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE29EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE20EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 7 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 2 | ConcreteAction::apply(res, pos); | 340 | 2 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 2 | break; | 342 | 2 | } | 343 | 2 | } | 344 | 5 | } | 345 | 5 | dst_data[row] = res; | 346 | 5 | } | 347 | | | 348 | 3 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 3 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 3 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE30EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE35EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE25EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE26EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE27EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE36EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE37EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE2EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE3EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 6 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 1 | ConcreteAction::apply(res, pos); | 340 | 1 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 1 | break; | 342 | 1 | } | 343 | 1 | } | 344 | 5 | } | 345 | 4 | dst_data[row] = res; | 346 | 4 | } | 347 | | | 348 | 2 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 2 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 2 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE4EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE5EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 2 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 2 | const auto& nested_data = | 300 | 2 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 2 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 2 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 2 | auto& dst_data = dst->get_data(); | 308 | 2 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 2 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 12 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 8 | if (outer_null_map && outer_null_map[row]) { | 314 | 2 | dst_null_data[row] = true; | 315 | 2 | continue; | 316 | 2 | } | 317 | 6 | dst_null_data[row] = false; | 318 | 6 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 6 | size_t off = offsets[row - 1]; | 320 | 6 | size_t len = offsets[row] - off; | 321 | 16 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 10 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 10 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 10 | if (right_nested_null_map && nested_null_map && | 332 | 10 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 10 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 10 | if (nested_data[pos + off] == right_data[row]) { | 339 | 2 | ConcreteAction::apply(res, pos); | 340 | 2 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 2 | break; | 342 | 2 | } | 343 | 2 | } | 344 | 10 | } | 345 | 8 | dst_data[row] = res; | 346 | 8 | } | 347 | | | 348 | 4 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 4 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 4 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE6EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE7EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE8EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE9EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE28EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE29EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE20EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Line | Count | Source | 297 | 1 | const UInt8* outer_null_map) const { | 298 | | // check array nested column type and get data | 299 | 1 | const auto& nested_data = | 300 | 1 | reinterpret_cast<const NestedColumnType&>(nested_column).get_data(); | 301 | | | 302 | | // check right column type and get data | 303 | 1 | const auto& right_data = reinterpret_cast<const RightColumnType&>(right_column).get_data(); | 304 | | | 305 | | // prepare return data | 306 | 1 | auto dst = PrimitiveTypeTraits<ResultType>::ColumnType::create(offsets.size(), 0); | 307 | 1 | auto& dst_data = dst->get_data(); | 308 | 1 | auto dst_null_column = ColumnUInt8::create(offsets.size(), 0); | 309 | 1 | auto& dst_null_data = dst_null_column->get_data(); | 310 | | | 311 | | // process | 312 | 7 | for (size_t row = 0; row < offsets.size(); ++row) { | 313 | 4 | if (outer_null_map && outer_null_map[row]) { | 314 | 1 | dst_null_data[row] = true; | 315 | 1 | continue; | 316 | 1 | } | 317 | 3 | dst_null_data[row] = false; | 318 | 3 | typename PrimitiveTypeTraits<ResultType>::CppType res = 0; | 319 | 3 | size_t off = offsets[row - 1]; | 320 | 3 | size_t len = offsets[row] - off; | 321 | 8 | for (size_t pos = 0; pos < len; ++pos) { | 322 | | // match null value | 323 | 5 | if (right_nested_null_map && right_nested_null_map[row] && nested_null_map && | 324 | 5 | nested_null_map[pos + off]) { | 325 | 0 | ConcreteAction::apply(res, pos); | 326 | 0 | if constexpr (!ConcreteAction::resume_execution) { | 327 | 0 | break; | 328 | 0 | } | 329 | 0 | } | 330 | | // some is null while another is not | 331 | 5 | if (right_nested_null_map && nested_null_map && | 332 | 5 | right_nested_null_map[row] != nested_null_map[pos + off]) { | 333 | 0 | continue; | 334 | 0 | } | 335 | 5 | if (nested_null_map && nested_null_map[pos + off]) { | 336 | 0 | continue; | 337 | 0 | } | 338 | 5 | if (nested_data[pos + off] == right_data[row]) { | 339 | 2 | ConcreteAction::apply(res, pos); | 340 | 2 | if constexpr (!ConcreteAction::resume_execution) { | 341 | 2 | break; | 342 | 2 | } | 343 | 2 | } | 344 | 5 | } | 345 | 5 | dst_data[row] = res; | 346 | 5 | } | 347 | | | 348 | 3 | if (outer_null_map == nullptr) { | 349 | 0 | return dst; | 350 | 0 | } | 351 | 3 | return ColumnNullable::create(std::move(dst), std::move(dst_null_column)); | 352 | 3 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE30EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE35EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE25EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE26EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE27EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE36EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE37EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE2EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE3EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE4EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE5EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE6EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE7EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE8EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE9EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE28EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE29EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE20EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE30EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_13ColumnDecimalILNS_13PrimitiveTypeE35EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE25EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE26EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE27EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE36EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE15_execute_numberINS_12ColumnVectorILNS_13PrimitiveTypeE37EEES6_EENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ |
353 | | |
354 | | template <typename NestedColumnType> |
355 | | ColumnPtr _execute_number_expanded(const ColumnArray::Offsets64& offsets, |
356 | | const UInt8* nested_null_map, const IColumn& nested_column, |
357 | | const IColumn& right_column, |
358 | | const UInt8* right_nested_null_map, |
359 | 0 | const UInt8* outer_null_map) const { |
360 | 0 | if (is_column<NestedColumnType>(right_column)) { |
361 | 0 | return _execute_number<NestedColumnType, NestedColumnType>( |
362 | 0 | offsets, nested_null_map, nested_column, right_column, right_nested_null_map, |
363 | 0 | outer_null_map); |
364 | 0 | } |
365 | 0 | return nullptr; |
366 | 0 | } Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE27EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE27EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE27EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE24_execute_number_expandedINS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS8_EERKNS_8PODArrayImLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEEPKhRKS8_SM_SK_SK_ |
367 | | |
368 | | Status _execute_dispatch(Block& block, const ColumnNumbers& arguments, uint32_t result, |
369 | 13 | size_t input_rows_count) const { |
370 | | // extract array offsets and nested data |
371 | 13 | auto left_column = |
372 | 13 | block.get_by_position(arguments[0]).column->convert_to_full_column_if_const(); |
373 | 13 | if (block.get_by_position(arguments[0]).type->get_primitive_type() != TYPE_ARRAY) { |
374 | 0 | return Status::InvalidArgument(get_name() + " first argument must be array, but got " + |
375 | 0 | block.get_by_position(arguments[0]).type->get_name()); |
376 | 0 | } |
377 | 13 | const ColumnArray* array_column = nullptr; |
378 | 13 | const UInt8* array_null_map = nullptr; |
379 | 13 | if (left_column->is_nullable()) { |
380 | 13 | auto nullable_array = reinterpret_cast<const ColumnNullable*>(left_column.get()); |
381 | 13 | array_column = |
382 | 13 | reinterpret_cast<const ColumnArray*>(&nullable_array->get_nested_column()); |
383 | 13 | array_null_map = nullable_array->get_null_map_column().get_data().data(); |
384 | 13 | } else { |
385 | 0 | array_column = reinterpret_cast<const ColumnArray*>(left_column.get()); |
386 | 0 | } |
387 | 13 | const auto& offsets = array_column->get_offsets(); |
388 | 13 | const UInt8* nested_null_map = nullptr; |
389 | 13 | ColumnPtr nested_column = nullptr; |
390 | 13 | if (array_column->get_data().is_nullable()) { |
391 | 13 | const auto& nested_null_column = |
392 | 13 | reinterpret_cast<const ColumnNullable&>(array_column->get_data()); |
393 | 13 | nested_null_map = nested_null_column.get_null_map_column().get_data().data(); |
394 | 13 | nested_column = nested_null_column.get_nested_column_ptr(); |
395 | 13 | } else { |
396 | 0 | nested_column = array_column->get_data_ptr(); |
397 | 0 | } |
398 | | |
399 | | // get right column |
400 | 13 | ColumnPtr right_full_column = |
401 | 13 | block.get_by_position(arguments[1]).column->convert_to_full_column_if_const(); |
402 | 13 | ColumnPtr right_column = right_full_column; |
403 | 13 | const UInt8* right_nested_null_map = nullptr; |
404 | 13 | if (right_column->is_nullable()) { |
405 | 13 | const auto& nested_null_column = assert_cast<const ColumnNullable&>(*right_full_column); |
406 | 13 | right_column = nested_null_column.get_nested_column_ptr(); |
407 | 13 | right_nested_null_map = nested_null_column.get_null_map_column().get_data().data(); |
408 | 13 | } |
409 | | // execute |
410 | 13 | auto array_type = remove_nullable(block.get_by_position(arguments[0]).type); |
411 | 13 | auto left_element_type = |
412 | 13 | remove_nullable(assert_cast<const DataTypeArray&>(*array_type).get_nested_type()); |
413 | 13 | auto right_type = remove_nullable(block.get_by_position(arguments[1]).type); |
414 | | |
415 | 13 | ColumnPtr return_column = nullptr; |
416 | 13 | if (is_string_type(right_type->get_primitive_type()) && |
417 | 13 | is_string_type(left_element_type->get_primitive_type())) { |
418 | 2 | return_column = _execute_string(offsets, nested_null_map, *nested_column, *right_column, |
419 | 2 | right_nested_null_map, array_null_map); |
420 | 11 | } else if (is_number(right_type->get_primitive_type()) && |
421 | 11 | is_number(left_element_type->get_primitive_type())) { |
422 | 11 | auto call = [&](const auto& type) -> bool { |
423 | 11 | using DispatchType = std::decay_t<decltype(type)>; |
424 | 11 | return_column = _execute_number<typename DispatchType::ColumnType, |
425 | 11 | typename DispatchType::ColumnType>( |
426 | 11 | offsets, nested_null_map, *nested_column, *right_column, |
427 | 11 | right_nested_null_map, array_null_map); |
428 | 11 | return true; |
429 | 11 | }; Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE2EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE3EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE4EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE5EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
_ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE6EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
_ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE7EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
_ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE8EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
_ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE9EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE28EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE29EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE20EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE30EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE35EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE2EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE3EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE4EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE5EEEEEbSC_ Line | Count | Source | 422 | 2 | auto call = [&](const auto& type) -> bool { | 423 | 2 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 2 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 2 | typename DispatchType::ColumnType>( | 426 | 2 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 2 | right_nested_null_map, array_null_map); | 428 | 2 | return true; | 429 | 2 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE6EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE7EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE8EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE9EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE28EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE29EEEEEbSC_ _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE20EEEEEbSC_ Line | Count | Source | 422 | 1 | auto call = [&](const auto& type) -> bool { | 423 | 1 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 1 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 1 | typename DispatchType::ColumnType>( | 426 | 1 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 1 | right_nested_null_map, array_null_map); | 428 | 1 | return true; | 429 | 1 | }; |
Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE30EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE35EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE2EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE3EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE4EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE5EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE6EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE7EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE8EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE9EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE28EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE29EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE20EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE30EEEEEbSC_ Unexecuted instantiation: _ZZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjmENKUlRKT_E_clINS_16DispatchDataTypeILNS_13PrimitiveTypeE35EEEEEbSC_ |
430 | 11 | if (!dispatch_switch_number(right_type->get_primitive_type(), call)) { |
431 | 0 | return Status::InternalError(get_name() + " not support right type " + |
432 | 0 | right_type->get_name()); |
433 | 0 | } |
434 | 11 | } else if ((is_date_v2_or_datetime_v2(right_type->get_primitive_type()) || |
435 | 0 | right_type->get_primitive_type() == TYPE_TIMEV2) && |
436 | 0 | (is_date_v2_or_datetime_v2(left_element_type->get_primitive_type()) || |
437 | 0 | left_element_type->get_primitive_type() == TYPE_TIMEV2)) { |
438 | 0 | if (left_element_type->get_primitive_type() == TYPE_DATEV2) { |
439 | 0 | return_column = _execute_number_expanded<ColumnDateV2>( |
440 | 0 | offsets, nested_null_map, *nested_column, *right_column, |
441 | 0 | right_nested_null_map, array_null_map); |
442 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_DATETIMEV2) { |
443 | 0 | return_column = _execute_number_expanded<ColumnDateTimeV2>( |
444 | 0 | offsets, nested_null_map, *nested_column, *right_column, |
445 | 0 | right_nested_null_map, array_null_map); |
446 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_TIMEV2) { |
447 | 0 | return_column = _execute_number_expanded<ColumnTimeV2>( |
448 | 0 | offsets, nested_null_map, *nested_column, *right_column, |
449 | 0 | right_nested_null_map, array_null_map); |
450 | 0 | } |
451 | 0 | } else if (is_ip(right_type->get_primitive_type()) && |
452 | 0 | is_ip(left_element_type->get_primitive_type())) { |
453 | 0 | if (left_element_type->get_primitive_type() == TYPE_IPV4) { |
454 | 0 | return_column = _execute_number_expanded<ColumnIPv4>( |
455 | 0 | offsets, nested_null_map, *nested_column, *right_column, |
456 | 0 | right_nested_null_map, array_null_map); |
457 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_IPV6) { |
458 | 0 | return_column = _execute_number_expanded<ColumnIPv6>( |
459 | 0 | offsets, nested_null_map, *nested_column, *right_column, |
460 | 0 | right_nested_null_map, array_null_map); |
461 | 0 | } |
462 | 0 | } |
463 | | |
464 | 13 | if (return_column) { |
465 | 13 | block.replace_by_position(result, std::move(return_column)); |
466 | 13 | return Status::OK(); |
467 | 13 | } |
468 | 0 | return Status::RuntimeError("execute failed or unsupported types for function {}({}, {})", |
469 | 0 | get_name(), |
470 | 0 | block.get_by_position(arguments[0]).type->get_name(), |
471 | 0 | block.get_by_position(arguments[1]).type->get_name()); |
472 | 13 | } _ZNK5doris18FunctionArrayIndexINS_19ArrayContainsActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 369 | 8 | size_t input_rows_count) const { | 370 | | // extract array offsets and nested data | 371 | 8 | auto left_column = | 372 | 8 | block.get_by_position(arguments[0]).column->convert_to_full_column_if_const(); | 373 | 8 | if (block.get_by_position(arguments[0]).type->get_primitive_type() != TYPE_ARRAY) { | 374 | 0 | return Status::InvalidArgument(get_name() + " first argument must be array, but got " + | 375 | 0 | block.get_by_position(arguments[0]).type->get_name()); | 376 | 0 | } | 377 | 8 | const ColumnArray* array_column = nullptr; | 378 | 8 | const UInt8* array_null_map = nullptr; | 379 | 8 | if (left_column->is_nullable()) { | 380 | 8 | auto nullable_array = reinterpret_cast<const ColumnNullable*>(left_column.get()); | 381 | 8 | array_column = | 382 | 8 | reinterpret_cast<const ColumnArray*>(&nullable_array->get_nested_column()); | 383 | 8 | array_null_map = nullable_array->get_null_map_column().get_data().data(); | 384 | 8 | } else { | 385 | 0 | array_column = reinterpret_cast<const ColumnArray*>(left_column.get()); | 386 | 0 | } | 387 | 8 | const auto& offsets = array_column->get_offsets(); | 388 | 8 | const UInt8* nested_null_map = nullptr; | 389 | 8 | ColumnPtr nested_column = nullptr; | 390 | 8 | if (array_column->get_data().is_nullable()) { | 391 | 8 | const auto& nested_null_column = | 392 | 8 | reinterpret_cast<const ColumnNullable&>(array_column->get_data()); | 393 | 8 | nested_null_map = nested_null_column.get_null_map_column().get_data().data(); | 394 | 8 | nested_column = nested_null_column.get_nested_column_ptr(); | 395 | 8 | } else { | 396 | 0 | nested_column = array_column->get_data_ptr(); | 397 | 0 | } | 398 | | | 399 | | // get right column | 400 | 8 | ColumnPtr right_full_column = | 401 | 8 | block.get_by_position(arguments[1]).column->convert_to_full_column_if_const(); | 402 | 8 | ColumnPtr right_column = right_full_column; | 403 | 8 | const UInt8* right_nested_null_map = nullptr; | 404 | 8 | if (right_column->is_nullable()) { | 405 | 8 | const auto& nested_null_column = assert_cast<const ColumnNullable&>(*right_full_column); | 406 | 8 | right_column = nested_null_column.get_nested_column_ptr(); | 407 | 8 | right_nested_null_map = nested_null_column.get_null_map_column().get_data().data(); | 408 | 8 | } | 409 | | // execute | 410 | 8 | auto array_type = remove_nullable(block.get_by_position(arguments[0]).type); | 411 | 8 | auto left_element_type = | 412 | 8 | remove_nullable(assert_cast<const DataTypeArray&>(*array_type).get_nested_type()); | 413 | 8 | auto right_type = remove_nullable(block.get_by_position(arguments[1]).type); | 414 | | | 415 | 8 | ColumnPtr return_column = nullptr; | 416 | 8 | if (is_string_type(right_type->get_primitive_type()) && | 417 | 8 | is_string_type(left_element_type->get_primitive_type())) { | 418 | 1 | return_column = _execute_string(offsets, nested_null_map, *nested_column, *right_column, | 419 | 1 | right_nested_null_map, array_null_map); | 420 | 7 | } else if (is_number(right_type->get_primitive_type()) && | 421 | 7 | is_number(left_element_type->get_primitive_type())) { | 422 | 7 | auto call = [&](const auto& type) -> bool { | 423 | 7 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 7 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 7 | typename DispatchType::ColumnType>( | 426 | 7 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 7 | right_nested_null_map, array_null_map); | 428 | 7 | return true; | 429 | 7 | }; | 430 | 7 | if (!dispatch_switch_number(right_type->get_primitive_type(), call)) { | 431 | 0 | return Status::InternalError(get_name() + " not support right type " + | 432 | 0 | right_type->get_name()); | 433 | 0 | } | 434 | 7 | } else if ((is_date_v2_or_datetime_v2(right_type->get_primitive_type()) || | 435 | 0 | right_type->get_primitive_type() == TYPE_TIMEV2) && | 436 | 0 | (is_date_v2_or_datetime_v2(left_element_type->get_primitive_type()) || | 437 | 0 | left_element_type->get_primitive_type() == TYPE_TIMEV2)) { | 438 | 0 | if (left_element_type->get_primitive_type() == TYPE_DATEV2) { | 439 | 0 | return_column = _execute_number_expanded<ColumnDateV2>( | 440 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 441 | 0 | right_nested_null_map, array_null_map); | 442 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_DATETIMEV2) { | 443 | 0 | return_column = _execute_number_expanded<ColumnDateTimeV2>( | 444 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 445 | 0 | right_nested_null_map, array_null_map); | 446 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_TIMEV2) { | 447 | 0 | return_column = _execute_number_expanded<ColumnTimeV2>( | 448 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 449 | 0 | right_nested_null_map, array_null_map); | 450 | 0 | } | 451 | 0 | } else if (is_ip(right_type->get_primitive_type()) && | 452 | 0 | is_ip(left_element_type->get_primitive_type())) { | 453 | 0 | if (left_element_type->get_primitive_type() == TYPE_IPV4) { | 454 | 0 | return_column = _execute_number_expanded<ColumnIPv4>( | 455 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 456 | 0 | right_nested_null_map, array_null_map); | 457 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_IPV6) { | 458 | 0 | return_column = _execute_number_expanded<ColumnIPv6>( | 459 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 460 | 0 | right_nested_null_map, array_null_map); | 461 | 0 | } | 462 | 0 | } | 463 | | | 464 | 8 | if (return_column) { | 465 | 8 | block.replace_by_position(result, std::move(return_column)); | 466 | 8 | return Status::OK(); | 467 | 8 | } | 468 | 0 | return Status::RuntimeError("execute failed or unsupported types for function {}({}, {})", | 469 | 0 | get_name(), | 470 | 0 | block.get_by_position(arguments[0]).type->get_name(), | 471 | 0 | block.get_by_position(arguments[1]).type->get_name()); | 472 | 8 | } |
_ZNK5doris18FunctionArrayIndexINS_19ArrayPositionActionEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 369 | 5 | size_t input_rows_count) const { | 370 | | // extract array offsets and nested data | 371 | 5 | auto left_column = | 372 | 5 | block.get_by_position(arguments[0]).column->convert_to_full_column_if_const(); | 373 | 5 | if (block.get_by_position(arguments[0]).type->get_primitive_type() != TYPE_ARRAY) { | 374 | 0 | return Status::InvalidArgument(get_name() + " first argument must be array, but got " + | 375 | 0 | block.get_by_position(arguments[0]).type->get_name()); | 376 | 0 | } | 377 | 5 | const ColumnArray* array_column = nullptr; | 378 | 5 | const UInt8* array_null_map = nullptr; | 379 | 5 | if (left_column->is_nullable()) { | 380 | 5 | auto nullable_array = reinterpret_cast<const ColumnNullable*>(left_column.get()); | 381 | 5 | array_column = | 382 | 5 | reinterpret_cast<const ColumnArray*>(&nullable_array->get_nested_column()); | 383 | 5 | array_null_map = nullable_array->get_null_map_column().get_data().data(); | 384 | 5 | } else { | 385 | 0 | array_column = reinterpret_cast<const ColumnArray*>(left_column.get()); | 386 | 0 | } | 387 | 5 | const auto& offsets = array_column->get_offsets(); | 388 | 5 | const UInt8* nested_null_map = nullptr; | 389 | 5 | ColumnPtr nested_column = nullptr; | 390 | 5 | if (array_column->get_data().is_nullable()) { | 391 | 5 | const auto& nested_null_column = | 392 | 5 | reinterpret_cast<const ColumnNullable&>(array_column->get_data()); | 393 | 5 | nested_null_map = nested_null_column.get_null_map_column().get_data().data(); | 394 | 5 | nested_column = nested_null_column.get_nested_column_ptr(); | 395 | 5 | } else { | 396 | 0 | nested_column = array_column->get_data_ptr(); | 397 | 0 | } | 398 | | | 399 | | // get right column | 400 | 5 | ColumnPtr right_full_column = | 401 | 5 | block.get_by_position(arguments[1]).column->convert_to_full_column_if_const(); | 402 | 5 | ColumnPtr right_column = right_full_column; | 403 | 5 | const UInt8* right_nested_null_map = nullptr; | 404 | 5 | if (right_column->is_nullable()) { | 405 | 5 | const auto& nested_null_column = assert_cast<const ColumnNullable&>(*right_full_column); | 406 | 5 | right_column = nested_null_column.get_nested_column_ptr(); | 407 | 5 | right_nested_null_map = nested_null_column.get_null_map_column().get_data().data(); | 408 | 5 | } | 409 | | // execute | 410 | 5 | auto array_type = remove_nullable(block.get_by_position(arguments[0]).type); | 411 | 5 | auto left_element_type = | 412 | 5 | remove_nullable(assert_cast<const DataTypeArray&>(*array_type).get_nested_type()); | 413 | 5 | auto right_type = remove_nullable(block.get_by_position(arguments[1]).type); | 414 | | | 415 | 5 | ColumnPtr return_column = nullptr; | 416 | 5 | if (is_string_type(right_type->get_primitive_type()) && | 417 | 5 | is_string_type(left_element_type->get_primitive_type())) { | 418 | 1 | return_column = _execute_string(offsets, nested_null_map, *nested_column, *right_column, | 419 | 1 | right_nested_null_map, array_null_map); | 420 | 4 | } else if (is_number(right_type->get_primitive_type()) && | 421 | 4 | is_number(left_element_type->get_primitive_type())) { | 422 | 4 | auto call = [&](const auto& type) -> bool { | 423 | 4 | using DispatchType = std::decay_t<decltype(type)>; | 424 | 4 | return_column = _execute_number<typename DispatchType::ColumnType, | 425 | 4 | typename DispatchType::ColumnType>( | 426 | 4 | offsets, nested_null_map, *nested_column, *right_column, | 427 | 4 | right_nested_null_map, array_null_map); | 428 | 4 | return true; | 429 | 4 | }; | 430 | 4 | if (!dispatch_switch_number(right_type->get_primitive_type(), call)) { | 431 | 0 | return Status::InternalError(get_name() + " not support right type " + | 432 | 0 | right_type->get_name()); | 433 | 0 | } | 434 | 4 | } else if ((is_date_v2_or_datetime_v2(right_type->get_primitive_type()) || | 435 | 0 | right_type->get_primitive_type() == TYPE_TIMEV2) && | 436 | 0 | (is_date_v2_or_datetime_v2(left_element_type->get_primitive_type()) || | 437 | 0 | left_element_type->get_primitive_type() == TYPE_TIMEV2)) { | 438 | 0 | if (left_element_type->get_primitive_type() == TYPE_DATEV2) { | 439 | 0 | return_column = _execute_number_expanded<ColumnDateV2>( | 440 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 441 | 0 | right_nested_null_map, array_null_map); | 442 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_DATETIMEV2) { | 443 | 0 | return_column = _execute_number_expanded<ColumnDateTimeV2>( | 444 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 445 | 0 | right_nested_null_map, array_null_map); | 446 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_TIMEV2) { | 447 | 0 | return_column = _execute_number_expanded<ColumnTimeV2>( | 448 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 449 | 0 | right_nested_null_map, array_null_map); | 450 | 0 | } | 451 | 0 | } else if (is_ip(right_type->get_primitive_type()) && | 452 | 0 | is_ip(left_element_type->get_primitive_type())) { | 453 | 0 | if (left_element_type->get_primitive_type() == TYPE_IPV4) { | 454 | 0 | return_column = _execute_number_expanded<ColumnIPv4>( | 455 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 456 | 0 | right_nested_null_map, array_null_map); | 457 | 0 | } else if (left_element_type->get_primitive_type() == TYPE_IPV6) { | 458 | 0 | return_column = _execute_number_expanded<ColumnIPv6>( | 459 | 0 | offsets, nested_null_map, *nested_column, *right_column, | 460 | 0 | right_nested_null_map, array_null_map); | 461 | 0 | } | 462 | 0 | } | 463 | | | 464 | 5 | if (return_column) { | 465 | 5 | block.replace_by_position(result, std::move(return_column)); | 466 | 5 | return Status::OK(); | 467 | 5 | } | 468 | 0 | return Status::RuntimeError("execute failed or unsupported types for function {}({}, {})", | 469 | 0 | get_name(), | 470 | 0 | block.get_by_position(arguments[0]).type->get_name(), | 471 | 0 | block.get_by_position(arguments[1]).type->get_name()); | 472 | 5 | } |
Unexecuted instantiation: _ZNK5doris18FunctionArrayIndexINS_15ArrayCountEqualEE17_execute_dispatchERNS_5BlockERKSt6vectorIjSaIjEEjm |
473 | | }; |
474 | | |
475 | | } // namespace doris |