/root/doris/be/src/exprs/minmax_predicate.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <type_traits> |
21 | | |
22 | | #include "common/object_pool.h" |
23 | | #include "exprs/runtime_filter.h" |
24 | | #include "runtime/type_limit.h" |
25 | | #include "vec/columns/column.h" |
26 | | #include "vec/columns/column_nullable.h" |
27 | | #include "vec/columns/column_string.h" |
28 | | #include "vec/common/assert_cast.h" |
29 | | #include "vec/common/string_ref.h" |
30 | | |
31 | | namespace doris { |
32 | | // only used in Runtime Filter |
33 | | class MinMaxFuncBase : public RuntimeFilterFuncBase { |
34 | | public: |
35 | | virtual void insert_fixed_len(const vectorized::ColumnPtr& column, size_t start) = 0; |
36 | | virtual void* get_max() = 0; |
37 | | virtual void* get_min() = 0; |
38 | | // assign minmax data |
39 | | virtual Status assign(void* min_data, void* max_data) = 0; |
40 | | // merge from other minmax_func |
41 | | virtual Status merge(MinMaxFuncBase* minmax_func) = 0; |
42 | 0 | virtual ~MinMaxFuncBase() = default; |
43 | | |
44 | 0 | bool contain_null() const { return _null_aware && _contain_null; } |
45 | | |
46 | 0 | void set_contain_null() { _contain_null = true; } |
47 | | |
48 | | protected: |
49 | | bool _contain_null = false; |
50 | | }; |
51 | | |
52 | | template <class T, bool NeedMax = true, bool NeedMin = true> |
53 | | class MinMaxNumFunc : public MinMaxFuncBase { |
54 | | public: |
55 | 0 | MinMaxNumFunc() = default; Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EEC2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EEC2Ev |
56 | 0 | ~MinMaxNumFunc() override = default; Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EED2Ev Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EED2Ev |
57 | | |
58 | 0 | void insert_fixed_len(const vectorized::ColumnPtr& column, size_t start) override { |
59 | 0 | if (column->is_nullable()) { |
60 | 0 | const auto* nullable = assert_cast<const vectorized::ColumnNullable*>(column.get()); |
61 | 0 | const auto& col = nullable->get_nested_column_ptr(); |
62 | 0 | const auto& nullmap = nullable->get_null_map_data(); |
63 | 0 | if (nullable->has_null()) { |
64 | 0 | update_batch(col, nullmap, start); |
65 | 0 | _contain_null = true; |
66 | 0 | } else { |
67 | 0 | update_batch(col, start); |
68 | 0 | } |
69 | 0 | } else { |
70 | 0 | update_batch(column, start); |
71 | 0 | } |
72 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrISA_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE16insert_fixed_lenERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE16insert_fixed_lenERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE16insert_fixed_lenERKN3COWINS1_7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE16insert_fixed_lenERKN3COWINS1_7IColumnEE13immutable_ptrIS9_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE16insert_fixed_lenERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm |
73 | | |
74 | | void _update_batch_string(const auto& column_string, const uint8_t* __restrict nullmap, |
75 | 0 | size_t start, size_t size) { |
76 | 0 | for (size_t i = start; i < size; i++) { |
77 | 0 | if (nullmap == nullptr || !nullmap[i]) { |
78 | 0 | if constexpr (NeedMin) { |
79 | 0 | if (column_string.get_data_at(i) < StringRef(_min)) { |
80 | 0 | _min = column_string.get_data_at(i).to_string(); |
81 | 0 | } |
82 | 0 | } |
83 | 0 | if constexpr (NeedMax) { |
84 | 0 | if (column_string.get_data_at(i) > StringRef(_max)) { |
85 | 0 | _max = column_string.get_data_at(i).to_string(); |
86 | 0 | } |
87 | 0 | } |
88 | 0 | } |
89 | 0 | } |
90 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE20_update_batch_stringINS_10vectorized9ColumnStrImEEEEvRKT_PKhmm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE20_update_batch_stringINS_10vectorized9ColumnStrIjEEEEvRKT_PKhmm |
91 | | |
92 | 0 | void update_batch(const vectorized::ColumnPtr& column, size_t start) { |
93 | 0 | const auto size = column->size(); |
94 | 0 | if constexpr (std::is_same_v<T, std::string>) { |
95 | 0 | if (column->is_column_string64()) { |
96 | 0 | _update_batch_string(assert_cast<const vectorized::ColumnString64&>(*column), |
97 | 0 | nullptr, start, size); |
98 | 0 | } else { |
99 | 0 | _update_batch_string(assert_cast<const vectorized::ColumnString&>(*column), nullptr, |
100 | 0 | start, size); |
101 | 0 | } |
102 | 0 | } else { |
103 | 0 | const T* data = (T*)column->get_raw_data().data; |
104 | 0 | for (size_t i = start; i < size; i++) { |
105 | 0 | if constexpr (NeedMin) { |
106 | 0 | _min = std::min(_min, *(data + i)); |
107 | 0 | } |
108 | 0 | if constexpr (NeedMax) { |
109 | 0 | _max = std::max(_max, *(data + i)); |
110 | 0 | } |
111 | 0 | } |
112 | 0 | } |
113 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrISA_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS5_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS9_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EEm |
114 | | |
115 | | void update_batch(const vectorized::ColumnPtr& column, const vectorized::NullMap& nullmap, |
116 | 0 | size_t start) { |
117 | 0 | const auto size = column->size(); |
118 | 0 | if constexpr (std::is_same_v<T, std::string>) { |
119 | 0 | if (column->is_column_string64()) { |
120 | 0 | _update_batch_string(assert_cast<const vectorized::ColumnString64&>(*column), |
121 | 0 | nullmap.data(), start, size); |
122 | 0 | } else { |
123 | 0 | _update_batch_string(assert_cast<const vectorized::ColumnString&>(*column), |
124 | 0 | nullmap.data(), start, size); |
125 | 0 | } |
126 | 0 | } else { |
127 | 0 | const T* data = (T*)column->get_raw_data().data; |
128 | 0 | for (size_t i = start; i < size; i++) { |
129 | 0 | if (!nullmap[i]) { |
130 | 0 | if constexpr (NeedMin) { |
131 | 0 | _min = std::min(_min, *(data + i)); |
132 | 0 | } |
133 | 0 | if constexpr (NeedMax) { |
134 | 0 | _max = std::max(_max, *(data + i)); |
135 | 0 | } |
136 | 0 | } |
137 | 0 | } |
138 | 0 | } |
139 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EERKNS4_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS5_EERKNS4_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EERKNS6_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS7_EERKNS6_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrISA_EERKNS9_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EERKNS1_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS6_EERKNS1_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS5_EERKNS1_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE12update_batchERKN3COWINS1_7IColumnEE13immutable_ptrIS9_EERKNS1_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE12update_batchERKN3COWINS_10vectorized7IColumnEE13immutable_ptrIS4_EERKNS3_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEm |
140 | | |
141 | 0 | Status merge(MinMaxFuncBase* minmax_func) override { |
142 | 0 | auto* other_minmax = static_cast<MinMaxNumFunc<T>*>(minmax_func); |
143 | 0 | if constexpr (NeedMin) { |
144 | 0 | if (other_minmax->_min < _min) { |
145 | 0 | _min = other_minmax->_min; |
146 | 0 | } |
147 | 0 | } |
148 | 0 | if constexpr (NeedMax) { |
149 | 0 | if (other_minmax->_max > _max) { |
150 | 0 | _max = other_minmax->_max; |
151 | 0 | } |
152 | 0 | } |
153 | |
|
154 | 0 | _contain_null |= minmax_func->contain_null(); |
155 | 0 | return Status::OK(); |
156 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE5mergeEPNS_14MinMaxFuncBaseE |
157 | | |
158 | 0 | void* get_max() override { return &_max; } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE7get_maxEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE7get_maxEv |
159 | | |
160 | 0 | void* get_min() override { return &_min; } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE7get_minEv Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE7get_minEv |
161 | | |
162 | 0 | Status assign(void* min_data, void* max_data) override { |
163 | 0 | _min = *(T*)min_data; |
164 | 0 | _max = *(T*)max_data; |
165 | 0 | return Status::OK(); |
166 | 0 | } Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIbLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_14DecimalV2ValueELb1ELb1EE6assignEPvS3_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIaLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIsLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIiLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIlLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncInLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIfLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIdLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_16VecDateTimeValueELb1ELb1EE6assignEPvS3_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_15DateV2ValueTypeEEELb1ELb1EE6assignEPvS5_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_11DateV2ValueINS_19DateTimeV2ValueTypeEEELb1ELb1EE6assignEPvS5_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ELb1EE6assignEPvS8_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIiEELb1ELb1EE6assignEPvS5_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIlEELb1ELb1EE6assignEPvS5_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized12Decimal128V3ELb1ELb1EE6assignEPvS4_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncINS_10vectorized7DecimalIN4wide7integerILm256EiEEEELb1ELb1EE6assignEPvS8_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIjLb1ELb1EE6assignEPvS2_ Unexecuted instantiation: _ZN5doris13MinMaxNumFuncIoLb1ELb1EE6assignEPvS2_ |
167 | | |
168 | | protected: |
169 | | T _max = type_limit<T>::min(); |
170 | | T _min = type_limit<T>::max(); |
171 | | }; |
172 | | |
173 | | template <class T> |
174 | | using MinNumFunc = MinMaxNumFunc<T, false, true>; |
175 | | |
176 | | template <class T> |
177 | | using MaxNumFunc = MinMaxNumFunc<T, true, false>; |
178 | | |
179 | | } // namespace doris |