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/Core/Field.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <fmt/format.h> |
24 | | #include <glog/logging.h> |
25 | | |
26 | | #include <algorithm> |
27 | | #include <cassert> |
28 | | #include <cmath> |
29 | | #include <cstring> |
30 | | #include <string> |
31 | | #include <string_view> |
32 | | #include <type_traits> |
33 | | #include <utility> |
34 | | #include <vector> |
35 | | |
36 | | #include "common/compiler_util.h" // IWYU pragma: keep |
37 | | #include "common/exception.h" |
38 | | #include "core/data_type/primitive_type.h" |
39 | | #include "core/string_view.h" |
40 | | #include "core/types.h" |
41 | | #include "core/uint128.h" |
42 | | #include "core/value/bitmap_value.h" |
43 | | #include "core/value/hll.h" |
44 | | #include "core/value/quantile_state.h" |
45 | | #include "core/value/variant/variant_field.h" |
46 | | |
47 | | namespace doris { |
48 | | template <PrimitiveType type> |
49 | | struct PrimitiveTypeTraits; |
50 | | template <typename T> |
51 | | struct TypeName; |
52 | | struct PackedInt128; |
53 | | } // namespace doris |
54 | | |
55 | | namespace doris { |
56 | | |
57 | | class Field; |
58 | | |
59 | | using FieldVector = std::vector<Field>; |
60 | | |
61 | | /// Array and Struct use the same storage type -- FieldVector, but we declare |
62 | | /// distinct types for them, so that the caller can choose whether it wants to |
63 | | /// construct a Field of Array or a Struct type. An alternative approach would be |
64 | | /// to construct both of these types from FieldVector, and have the caller |
65 | | /// specify the desired Field type explicitly. |
66 | | struct Array : public FieldVector { |
67 | | using FieldVector::FieldVector; |
68 | | }; |
69 | | |
70 | | struct Struct : public FieldVector { |
71 | | using FieldVector::FieldVector; |
72 | | }; |
73 | | |
74 | | struct Map : public FieldVector { |
75 | | using FieldVector::FieldVector; |
76 | | }; |
77 | | |
78 | | //TODO: rethink if we really need this? it only save one pointer from std::string |
79 | | // not POD type so could only use read/write_json_binary instead of read/write_binary |
80 | | class JsonbField { |
81 | | public: |
82 | 209k | JsonbField() = default; |
83 | 10.5M | ~JsonbField() = default; // unique_ptr will handle cleanup automatically |
84 | | |
85 | 2.18M | JsonbField(const char* ptr, size_t len) : size(len) { |
86 | 2.18M | data = std::make_unique<char[]>(size); |
87 | 2.18M | if (!data) { |
88 | 0 | throw Exception(Status::FatalError("new data buffer failed, size: {}", size)); |
89 | 0 | } |
90 | 2.18M | if (size > 0) { |
91 | 2.17M | memcpy(data.get(), ptr, size); |
92 | 2.17M | } |
93 | 2.18M | } |
94 | | |
95 | 2.26M | JsonbField(const JsonbField& x) : size(x.size) { |
96 | 2.26M | data = std::make_unique<char[]>(size); |
97 | 2.26M | if (!data) { |
98 | 0 | throw Exception(Status::FatalError("new data buffer failed, size: {}", size)); |
99 | 0 | } |
100 | 2.26M | if (size > 0) { |
101 | 2.25M | memcpy(data.get(), x.data.get(), size); |
102 | 2.25M | } |
103 | 2.26M | } |
104 | | |
105 | 5.85M | JsonbField(JsonbField&& x) noexcept : data(std::move(x.data)), size(x.size) { x.size = 0; } |
106 | | |
107 | | // dispatch for all type of storage. so need this. but not really used now. |
108 | 23 | JsonbField& operator=(const JsonbField& x) { |
109 | 23 | if (this != &x) { |
110 | 23 | data = std::make_unique<char[]>(x.size); |
111 | 23 | if (!data) { |
112 | 0 | throw Exception(Status::FatalError("new data buffer failed, size: {}", x.size)); |
113 | 0 | } |
114 | 23 | if (x.size > 0) { |
115 | 22 | memcpy(data.get(), x.data.get(), x.size); |
116 | 22 | } |
117 | 23 | size = x.size; |
118 | 23 | } |
119 | 23 | return *this; |
120 | 23 | } |
121 | | |
122 | 207k | JsonbField& operator=(JsonbField&& x) noexcept { |
123 | 207k | if (this != &x) { |
124 | 207k | data = std::move(x.data); |
125 | 207k | size = x.size; |
126 | 207k | x.size = 0; |
127 | 207k | } |
128 | 207k | return *this; |
129 | 207k | } |
130 | | |
131 | 1.71M | const char* get_value() const { return data.get(); } |
132 | 1.76M | size_t get_size() const { return size; } |
133 | | |
134 | 0 | bool operator<(const JsonbField& r) const { |
135 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
136 | 0 | } |
137 | 0 | bool operator<=(const JsonbField& r) const { |
138 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
139 | 0 | } |
140 | 0 | bool operator==(const JsonbField& r) const { |
141 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
142 | 0 | } |
143 | 0 | bool operator>(const JsonbField& r) const { |
144 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
145 | 0 | } |
146 | 0 | bool operator>=(const JsonbField& r) const { |
147 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
148 | 0 | } |
149 | 0 | bool operator!=(const JsonbField& r) const { |
150 | 0 | throw Exception(Status::FatalError("comparing between JsonbField is not supported")); |
151 | 0 | } |
152 | | |
153 | 0 | const JsonbField& operator+=(const JsonbField& r) { |
154 | 0 | throw Exception(Status::FatalError("Not support plus opration on JsonbField")); |
155 | 0 | } |
156 | | |
157 | 0 | const JsonbField& operator-=(const JsonbField& r) { |
158 | 0 | throw Exception(Status::FatalError("Not support minus opration on JsonbField")); |
159 | 0 | } |
160 | | |
161 | | private: |
162 | | std::unique_ptr<char[]> data = nullptr; |
163 | | size_t size = 0; |
164 | | }; |
165 | | |
166 | | template <typename T> |
167 | | bool decimal_equal(T x, T y, UInt32 x_scale, UInt32 y_scale); |
168 | | template <typename T> |
169 | | bool decimal_less(T x, T y, UInt32 x_scale, UInt32 y_scale); |
170 | | template <typename T> |
171 | | bool decimal_less_or_equal(T x, T y, UInt32 x_scale, UInt32 y_scale); |
172 | | |
173 | | /** 32 is enough. Round number is used for alignment and for better arithmetic inside std::vector. |
174 | | * NOTE: Actually, sizeof(std::string) is 32 when using libc++, so Field is 40 bytes. |
175 | | */ |
176 | | constexpr size_t DBMS_MIN_FIELD_SIZE = 32; |
177 | | |
178 | | /** Discriminated union of several types. |
179 | | * Made for replacement of `boost::variant` |
180 | | * is not generalized, |
181 | | * but somewhat more efficient, and simpler. |
182 | | * |
183 | | * Used to represent a single value of one of several types in memory. |
184 | | * Warning! Prefer to use chunks of columns instead of single values. See Column.h |
185 | | */ |
186 | | class Field { |
187 | | public: |
188 | | static const int MIN_NON_POD = 16; |
189 | 109M | Field() : type(PrimitiveType::TYPE_NULL) {} |
190 | | // set Types::Null explictly and avoid other types |
191 | 147M | Field(PrimitiveType w) : type(w) {} |
192 | | template <PrimitiveType T> |
193 | 43.2M | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { |
194 | 43.2M | auto f = Field(T); |
195 | 43.2M | f.template create_concrete<T>(data); |
196 | 43.2M | return f; |
197 | 43.2M | } _ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE23EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 936k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 936k | auto f = Field(T); | 195 | 936k | f.template create_concrete<T>(data); | 196 | 936k | return f; | 197 | 936k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE37EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 24.1k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 24.1k | auto f = Field(T); | 195 | 24.1k | f.template create_concrete<T>(data); | 196 | 24.1k | return f; | 197 | 24.1k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE41EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 14 | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 14 | auto f = Field(T); | 195 | 14 | f.template create_concrete<T>(data); | 196 | 14 | return f; | 197 | 14 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE5EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 24.8M | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 24.8M | auto f = Field(T); | 195 | 24.8M | f.template create_concrete<T>(data); | 196 | 24.8M | return f; | 197 | 24.8M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE17EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 471k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 471k | auto f = Field(T); | 195 | 471k | f.template create_concrete<T>(data); | 196 | 471k | return f; | 197 | 471k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE28EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 22.7k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 22.7k | auto f = Field(T); | 195 | 22.7k | f.template create_concrete<T>(data); | 196 | 22.7k | return f; | 197 | 22.7k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE29EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 29.2k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 29.2k | auto f = Field(T); | 195 | 29.2k | f.template create_concrete<T>(data); | 196 | 29.2k | return f; | 197 | 29.2k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE20EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 8.88k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 8.88k | auto f = Field(T); | 195 | 8.88k | f.template create_concrete<T>(data); | 196 | 8.88k | return f; | 197 | 8.88k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE30EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 28.0k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 28.0k | auto f = Field(T); | 195 | 28.0k | f.template create_concrete<T>(data); | 196 | 28.0k | return f; | 197 | 28.0k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE35EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 38.7k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 38.7k | auto f = Field(T); | 195 | 38.7k | f.template create_concrete<T>(data); | 196 | 38.7k | return f; | 197 | 38.7k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE19EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 404 | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 404 | auto f = Field(T); | 195 | 404 | f.template create_concrete<T>(data); | 196 | 404 | return f; | 197 | 404 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE24EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 22.3k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 22.3k | auto f = Field(T); | 195 | 22.3k | f.template create_concrete<T>(data); | 196 | 22.3k | return f; | 197 | 22.3k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE27EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 134 | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 134 | auto f = Field(T); | 195 | 134 | f.template create_concrete<T>(data); | 196 | 134 | return f; | 197 | 134 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE42EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 17.3k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 17.3k | auto f = Field(T); | 195 | 17.3k | f.template create_concrete<T>(data); | 196 | 17.3k | return f; | 197 | 17.3k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE22EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 2.42k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 2.42k | auto f = Field(T); | 195 | 2.42k | f.template create_concrete<T>(data); | 196 | 2.42k | return f; | 197 | 2.42k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE3EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 420k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 420k | auto f = Field(T); | 195 | 420k | f.template create_concrete<T>(data); | 196 | 420k | return f; | 197 | 420k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE4EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 50.2k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 50.2k | auto f = Field(T); | 195 | 50.2k | f.template create_concrete<T>(data); | 196 | 50.2k | return f; | 197 | 50.2k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE6EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 8.65M | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 8.65M | auto f = Field(T); | 195 | 8.65M | f.template create_concrete<T>(data); | 196 | 8.65M | return f; | 197 | 8.65M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE8EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 43.8k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 43.8k | auto f = Field(T); | 195 | 43.8k | f.template create_concrete<T>(data); | 196 | 43.8k | return f; | 197 | 43.8k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE9EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 6.45M | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 6.45M | auto f = Field(T); | 195 | 6.45M | f.template create_concrete<T>(data); | 196 | 6.45M | return f; | 197 | 6.45M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE11EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 29.8k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 29.8k | auto f = Field(T); | 195 | 29.8k | f.template create_concrete<T>(data); | 196 | 29.8k | return f; | 197 | 29.8k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE12EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 14.1k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 14.1k | auto f = Field(T); | 195 | 14.1k | f.template create_concrete<T>(data); | 196 | 14.1k | return f; | 197 | 14.1k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE26EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 101k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 101k | auto f = Field(T); | 195 | 101k | f.template create_concrete<T>(data); | 196 | 101k | return f; | 197 | 101k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE36EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 33.2k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 33.2k | auto f = Field(T); | 195 | 33.2k | f.template create_concrete<T>(data); | 196 | 33.2k | return f; | 197 | 33.2k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE2EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 95.1k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 95.1k | auto f = Field(T); | 195 | 95.1k | f.template create_concrete<T>(data); | 196 | 95.1k | return f; | 197 | 95.1k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE7EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 40.2k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 40.2k | auto f = Field(T); | 195 | 40.2k | f.template create_concrete<T>(data); | 196 | 40.2k | return f; | 197 | 40.2k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE25EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 603k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 603k | auto f = Field(T); | 195 | 603k | f.template create_concrete<T>(data); | 196 | 603k | return f; | 197 | 603k | } |
Unexecuted instantiation: _ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE38EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Unexecuted instantiation: _ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE39EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE _ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE15EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 1.09k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 1.09k | auto f = Field(T); | 195 | 1.09k | f.template create_concrete<T>(data); | 196 | 1.09k | return f; | 197 | 1.09k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE10EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 339k | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 339k | auto f = Field(T); | 195 | 339k | f.template create_concrete<T>(data); | 196 | 339k | return f; | 197 | 339k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE31EEES0_RKNS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 193 | 4 | static Field create_field(const typename PrimitiveTypeTraits<T>::CppType& data) { | 194 | 4 | auto f = Field(T); | 195 | 4 | f.template create_concrete<T>(data); | 196 | 4 | return f; | 197 | 4 | } |
|
198 | | template <PrimitiveType T> |
199 | 93.3M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { |
200 | 93.3M | auto f = Field(T); |
201 | 93.3M | f.template create_concrete<T>(std::move(data)); |
202 | 93.3M | return f; |
203 | 93.3M | } _ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE23EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 15.5M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 15.5M | auto f = Field(T); | 201 | 15.5M | f.template create_concrete<T>(std::move(data)); | 202 | 15.5M | return f; | 203 | 15.5M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE17EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 839k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 839k | auto f = Field(T); | 201 | 839k | f.template create_concrete<T>(std::move(data)); | 202 | 839k | return f; | 203 | 839k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE1EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 58.1k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 58.1k | auto f = Field(T); | 201 | 58.1k | f.template create_concrete<T>(std::move(data)); | 202 | 58.1k | return f; | 203 | 58.1k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE18EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 25.3k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 25.3k | auto f = Field(T); | 201 | 25.3k | f.template create_concrete<T>(std::move(data)); | 202 | 25.3k | return f; | 203 | 25.3k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE25EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 212k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 212k | auto f = Field(T); | 201 | 212k | f.template create_concrete<T>(std::move(data)); | 202 | 212k | return f; | 203 | 212k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE26EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 246k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 246k | auto f = Field(T); | 201 | 246k | f.template create_concrete<T>(std::move(data)); | 202 | 246k | return f; | 203 | 246k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE12EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 5.08k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 5.08k | auto f = Field(T); | 201 | 5.08k | f.template create_concrete<T>(std::move(data)); | 202 | 5.08k | return f; | 203 | 5.08k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE28EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 38.4k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 38.4k | auto f = Field(T); | 201 | 38.4k | f.template create_concrete<T>(std::move(data)); | 202 | 38.4k | return f; | 203 | 38.4k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE29EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 13.5M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 13.5M | auto f = Field(T); | 201 | 13.5M | f.template create_concrete<T>(std::move(data)); | 202 | 13.5M | return f; | 203 | 13.5M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE20EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 11.2k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 11.2k | auto f = Field(T); | 201 | 11.2k | f.template create_concrete<T>(std::move(data)); | 202 | 11.2k | return f; | 203 | 11.2k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE30EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 77.0k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 77.0k | auto f = Field(T); | 201 | 77.0k | f.template create_concrete<T>(std::move(data)); | 202 | 77.0k | return f; | 203 | 77.0k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE35EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 9.27k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 9.27k | auto f = Field(T); | 201 | 9.27k | f.template create_concrete<T>(std::move(data)); | 202 | 9.27k | return f; | 203 | 9.27k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE36EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 4.96k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 4.96k | auto f = Field(T); | 201 | 4.96k | f.template create_concrete<T>(std::move(data)); | 202 | 4.96k | return f; | 203 | 4.96k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE31EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 2.40M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 2.40M | auto f = Field(T); | 201 | 2.40M | f.template create_concrete<T>(std::move(data)); | 202 | 2.40M | return f; | 203 | 2.40M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE41EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 42 | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 42 | auto f = Field(T); | 201 | 42 | f.template create_concrete<T>(std::move(data)); | 202 | 42 | return f; | 203 | 42 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE2EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 28.7M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 28.7M | auto f = Field(T); | 201 | 28.7M | f.template create_concrete<T>(std::move(data)); | 202 | 28.7M | return f; | 203 | 28.7M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE3EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 4.80M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 4.80M | auto f = Field(T); | 201 | 4.80M | f.template create_concrete<T>(std::move(data)); | 202 | 4.80M | return f; | 203 | 4.80M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE4EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 91.0k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 91.0k | auto f = Field(T); | 201 | 91.0k | f.template create_concrete<T>(std::move(data)); | 202 | 91.0k | return f; | 203 | 91.0k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE5EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 2.13M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 2.13M | auto f = Field(T); | 201 | 2.13M | f.template create_concrete<T>(std::move(data)); | 202 | 2.13M | return f; | 203 | 2.13M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE6EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 20.1M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 20.1M | auto f = Field(T); | 201 | 20.1M | f.template create_concrete<T>(std::move(data)); | 202 | 20.1M | return f; | 203 | 20.1M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE7EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 128k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 128k | auto f = Field(T); | 201 | 128k | f.template create_concrete<T>(std::move(data)); | 202 | 128k | return f; | 203 | 128k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE8EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 46.3k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 46.3k | auto f = Field(T); | 201 | 46.3k | f.template create_concrete<T>(std::move(data)); | 202 | 46.3k | return f; | 203 | 46.3k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE9EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 3.00M | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 3.00M | auto f = Field(T); | 201 | 3.00M | f.template create_concrete<T>(std::move(data)); | 202 | 3.00M | return f; | 203 | 3.00M | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE27EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 4 | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 4 | auto f = Field(T); | 201 | 4 | f.template create_concrete<T>(std::move(data)); | 202 | 4 | return f; | 203 | 4 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE16EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 5.78k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 5.78k | auto f = Field(T); | 201 | 5.78k | f.template create_concrete<T>(std::move(data)); | 202 | 5.78k | return f; | 203 | 5.78k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE32EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 402k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 402k | auto f = Field(T); | 201 | 402k | f.template create_concrete<T>(std::move(data)); | 202 | 402k | return f; | 203 | 402k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE11EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 5.34k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 5.34k | auto f = Field(T); | 201 | 5.34k | f.template create_concrete<T>(std::move(data)); | 202 | 5.34k | return f; | 203 | 5.34k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE24EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 10 | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 10 | auto f = Field(T); | 201 | 10 | f.template create_concrete<T>(std::move(data)); | 202 | 10 | return f; | 203 | 10 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE42EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 25.6k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 25.6k | auto f = Field(T); | 201 | 25.6k | f.template create_concrete<T>(std::move(data)); | 202 | 25.6k | return f; | 203 | 25.6k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE37EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 2.83k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 2.83k | auto f = Field(T); | 201 | 2.83k | f.template create_concrete<T>(std::move(data)); | 202 | 2.83k | return f; | 203 | 2.83k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE22EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 62 | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 62 | auto f = Field(T); | 201 | 62 | f.template create_concrete<T>(std::move(data)); | 202 | 62 | return f; | 203 | 62 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE19EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 10 | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 10 | auto f = Field(T); | 201 | 10 | f.template create_concrete<T>(std::move(data)); | 202 | 10 | return f; | 203 | 10 | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE15EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 54.4k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 54.4k | auto f = Field(T); | 201 | 54.4k | f.template create_concrete<T>(std::move(data)); | 202 | 54.4k | return f; | 203 | 54.4k | } |
_ZN5doris5Field12create_fieldILNS_13PrimitiveTypeE10EEES0_ONS_19PrimitiveTypeTraitsIXT_EE7CppTypeE Line | Count | Source | 199 | 688k | static Field create_field(typename PrimitiveTypeTraits<T>::CppType&& data) { | 200 | 688k | auto f = Field(T); | 201 | 688k | f.template create_concrete<T>(std::move(data)); | 202 | 688k | return f; | 203 | 688k | } |
|
204 | | |
205 | | template <PrimitiveType PType, typename ValType = std::conditional_t< |
206 | | doris::is_string_type(PType), StringRef, |
207 | | typename PrimitiveTypeTraits<PType>::StorageFieldType>> |
208 | 1.34M | static Field create_field_from_olap_value(const ValType& data) { |
209 | 1.34M | auto f = Field(PType); |
210 | 1.34M | typename PrimitiveTypeTraits<PType>::CppType cpp_value; |
211 | 1.34M | if constexpr (is_string_type(PType)) { |
212 | 478k | cpp_value = String(data.data, data.size); |
213 | 478k | } else if constexpr (is_date_or_datetime(PType)) { |
214 | 1.75k | if constexpr (PType == TYPE_DATE) { |
215 | 729 | cpp_value.from_olap_date(data); |
216 | 1.02k | } else { |
217 | 1.02k | cpp_value.from_olap_datetime(data); |
218 | 1.02k | } |
219 | 1.75k | } else if constexpr (is_decimalv2(PType)) { |
220 | 467 | cpp_value = DecimalV2Value(data.integer, data.fraction); |
221 | 864k | } else { |
222 | 864k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); |
223 | 864k | } |
224 | 1.34M | f.template create_concrete<PType>(std::move(cpp_value)); |
225 | 1.34M | return f; |
226 | 1.34M | } _ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE3EaEES0_RKT0_ Line | Count | Source | 208 | 76.6k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 76.6k | auto f = Field(PType); | 210 | 76.6k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 76.6k | } else { | 222 | 76.6k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 76.6k | } | 224 | 76.6k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 76.6k | return f; | 226 | 76.6k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE4EsEES0_RKT0_ Line | Count | Source | 208 | 22.8k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 22.8k | auto f = Field(PType); | 210 | 22.8k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 22.8k | } else { | 222 | 22.8k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 22.8k | } | 224 | 22.8k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 22.8k | return f; | 226 | 22.8k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE5EiEES0_RKT0_ Line | Count | Source | 208 | 192k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 192k | auto f = Field(PType); | 210 | 192k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 192k | } else { | 222 | 192k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 192k | } | 224 | 192k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 192k | return f; | 226 | 192k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE6ElEES0_RKT0_ Line | Count | Source | 208 | 286k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 286k | auto f = Field(PType); | 210 | 286k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 286k | } else { | 222 | 286k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 286k | } | 224 | 286k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 286k | return f; | 226 | 286k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE7EnEES0_RKT0_ Line | Count | Source | 208 | 33.6k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 33.6k | auto f = Field(PType); | 210 | 33.6k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 33.6k | } else { | 222 | 33.6k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 33.6k | } | 224 | 33.6k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 33.6k | return f; | 226 | 33.6k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE8EfEES0_RKT0_ Line | Count | Source | 208 | 13.6k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 13.6k | auto f = Field(PType); | 210 | 13.6k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 13.6k | } else { | 222 | 13.6k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 13.6k | } | 224 | 13.6k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 13.6k | return f; | 226 | 13.6k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE9EdEES0_RKT0_ Line | Count | Source | 208 | 28.3k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 28.3k | auto f = Field(PType); | 210 | 28.3k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 28.3k | } else { | 222 | 28.3k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 28.3k | } | 224 | 28.3k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 28.3k | return f; | 226 | 28.3k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE15ENS_9StringRefEEES0_RKT0_ Line | Count | Source | 208 | 35.2k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 35.2k | auto f = Field(PType); | 210 | 35.2k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | 35.2k | if constexpr (is_string_type(PType)) { | 212 | 35.2k | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 35.2k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 35.2k | return f; | 226 | 35.2k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE11ENS_8uint24_tEEES0_RKT0_ Line | Count | Source | 208 | 729 | static Field create_field_from_olap_value(const ValType& data) { | 209 | 729 | auto f = Field(PType); | 210 | 729 | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | 729 | } else if constexpr (is_date_or_datetime(PType)) { | 214 | 729 | if constexpr (PType == TYPE_DATE) { | 215 | 729 | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 729 | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 729 | return f; | 226 | 729 | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE12EmEES0_RKT0_ Line | Count | Source | 208 | 1.02k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 1.02k | auto f = Field(PType); | 210 | 1.02k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | 1.02k | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | 1.02k | } else { | 217 | 1.02k | cpp_value.from_olap_datetime(data); | 218 | 1.02k | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 1.02k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 1.02k | return f; | 226 | 1.02k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE25EjEES0_RKT0_ Line | Count | Source | 208 | 60.7k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 60.7k | auto f = Field(PType); | 210 | 60.7k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 60.7k | } else { | 222 | 60.7k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 60.7k | } | 224 | 60.7k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 60.7k | return f; | 226 | 60.7k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE26EmEES0_RKT0_ Line | Count | Source | 208 | 62.9k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 62.9k | auto f = Field(PType); | 210 | 62.9k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 62.9k | } else { | 222 | 62.9k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 62.9k | } | 224 | 62.9k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 62.9k | return f; | 226 | 62.9k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE42EmEES0_RKT0_ Line | Count | Source | 208 | 7.03k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 7.03k | auto f = Field(PType); | 210 | 7.03k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 7.03k | } else { | 222 | 7.03k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 7.03k | } | 224 | 7.03k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 7.03k | return f; | 226 | 7.03k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE36EjEES0_RKT0_ Line | Count | Source | 208 | 1.07k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 1.07k | auto f = Field(PType); | 210 | 1.07k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 1.07k | } else { | 222 | 1.07k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 1.07k | } | 224 | 1.07k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 1.07k | return f; | 226 | 1.07k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE37EoEES0_RKT0_ Line | Count | Source | 208 | 1.10k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 1.10k | auto f = Field(PType); | 210 | 1.10k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 1.10k | } else { | 222 | 1.10k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 1.10k | } | 224 | 1.10k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 1.10k | return f; | 226 | 1.10k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE10ENS_9StringRefEEES0_RKT0_ Line | Count | Source | 208 | 274k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 274k | auto f = Field(PType); | 210 | 274k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | 274k | if constexpr (is_string_type(PType)) { | 212 | 274k | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 274k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 274k | return f; | 226 | 274k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE23ENS_9StringRefEEES0_RKT0_ Line | Count | Source | 208 | 167k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 167k | auto f = Field(PType); | 210 | 167k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | 167k | if constexpr (is_string_type(PType)) { | 212 | 167k | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 167k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 167k | return f; | 226 | 167k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE28EiEES0_RKT0_ Line | Count | Source | 208 | 6.80k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 6.80k | auto f = Field(PType); | 210 | 6.80k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 6.80k | } else { | 222 | 6.80k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 6.80k | } | 224 | 6.80k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 6.80k | return f; | 226 | 6.80k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE29ElEES0_RKT0_ Line | Count | Source | 208 | 32.4k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 32.4k | auto f = Field(PType); | 210 | 32.4k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 32.4k | } else { | 222 | 32.4k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 32.4k | } | 224 | 32.4k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 32.4k | return f; | 226 | 32.4k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE30EnEES0_RKT0_ Line | Count | Source | 208 | 19.9k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 19.9k | auto f = Field(PType); | 210 | 19.9k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 19.9k | } else { | 222 | 19.9k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 19.9k | } | 224 | 19.9k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 19.9k | return f; | 226 | 19.9k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE35EN4wide7integerILm256EiEEEES0_RKT0_ Line | Count | Source | 208 | 1.19k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 1.19k | auto f = Field(PType); | 210 | 1.19k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 1.19k | } else { | 222 | 1.19k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 1.19k | } | 224 | 1.19k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 1.19k | return f; | 226 | 1.19k | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE20ENS_11decimal12_tEEES0_RKT0_ Line | Count | Source | 208 | 467 | static Field create_field_from_olap_value(const ValType& data) { | 209 | 467 | auto f = Field(PType); | 210 | 467 | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | 467 | } else if constexpr (is_decimalv2(PType)) { | 220 | 467 | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | | } else { | 222 | | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | | } | 224 | 467 | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 467 | return f; | 226 | 467 | } |
_ZN5doris5Field28create_field_from_olap_valueILNS_13PrimitiveTypeE2EhEES0_RKT0_ Line | Count | Source | 208 | 17.7k | static Field create_field_from_olap_value(const ValType& data) { | 209 | 17.7k | auto f = Field(PType); | 210 | 17.7k | typename PrimitiveTypeTraits<PType>::CppType cpp_value; | 211 | | if constexpr (is_string_type(PType)) { | 212 | | cpp_value = String(data.data, data.size); | 213 | | } else if constexpr (is_date_or_datetime(PType)) { | 214 | | if constexpr (PType == TYPE_DATE) { | 215 | | cpp_value.from_olap_date(data); | 216 | | } else { | 217 | | cpp_value.from_olap_datetime(data); | 218 | | } | 219 | | } else if constexpr (is_decimalv2(PType)) { | 220 | | cpp_value = DecimalV2Value(data.integer, data.fraction); | 221 | 17.7k | } else { | 222 | 17.7k | cpp_value = typename PrimitiveTypeTraits<PType>::CppType(data); | 223 | 17.7k | } | 224 | 17.7k | f.template create_concrete<PType>(std::move(cpp_value)); | 225 | 17.7k | return f; | 226 | 17.7k | } |
|
227 | | |
228 | | /** Despite the presence of a template constructor, this constructor is still needed, |
229 | | * since, in its absence, the compiler will still generate the default constructor. |
230 | | */ |
231 | | Field(const Field& rhs); |
232 | | |
233 | | Field(Field&& rhs); |
234 | | |
235 | | Field& operator=(const Field& rhs); |
236 | | |
237 | 19.7M | bool is_complex_field() const { |
238 | 19.7M | return type == PrimitiveType::TYPE_ARRAY || type == PrimitiveType::TYPE_MAP || |
239 | 19.7M | type == PrimitiveType::TYPE_STRUCT || type == PrimitiveType::TYPE_VARIANT; |
240 | 19.7M | } |
241 | | |
242 | 84.3M | Field& operator=(Field&& rhs) { |
243 | 84.3M | if (this != &rhs) { |
244 | 84.3M | if (type != rhs.type) { |
245 | 59.0M | destroy(); |
246 | 59.0M | create(std::move(rhs)); |
247 | 59.0M | } else { |
248 | 25.2M | assign(std::move(rhs)); |
249 | 25.2M | } |
250 | 84.3M | } |
251 | 84.3M | return *this; |
252 | 84.3M | } |
253 | | |
254 | 537M | ~Field() { destroy(); } |
255 | | |
256 | 161M | PrimitiveType get_type() const { return type; } |
257 | | std::string get_type_name() const; |
258 | | |
259 | 187M | bool is_null() const { return type == PrimitiveType::TYPE_NULL; } |
260 | | |
261 | | // The template parameter T needs to be consistent with `which`. |
262 | | // If not, use NearestFieldType<> externally. |
263 | | // Maybe modify this in the future, reference: https://github.com/ClickHouse/ClickHouse/pull/22003 |
264 | | template <PrimitiveType T> |
265 | | typename PrimitiveTypeTraits<T>::CppType& get(); |
266 | | |
267 | | template <PrimitiveType T> |
268 | | const typename PrimitiveTypeTraits<T>::CppType& get() const; |
269 | | |
270 | 387k | bool is_nan() const { |
271 | | // Keep type dispatch with the value so callers cannot reinterpret Field storage using a |
272 | | // mismatched PrimitiveType. |
273 | 387k | if (type == PrimitiveType::TYPE_FLOAT) { |
274 | 47 | return std::isnan(get<TYPE_FLOAT>()); |
275 | 47 | } |
276 | 387k | if (type == PrimitiveType::TYPE_DOUBLE) { |
277 | 67 | return std::isnan(get<TYPE_DOUBLE>()); |
278 | 67 | } |
279 | 387k | return false; |
280 | 387k | } |
281 | | |
282 | 9.58M | bool operator==(const Field& rhs) const { |
283 | 9.58M | return operator<=>(rhs) == std::strong_ordering::equal; |
284 | 9.58M | } |
285 | | |
286 | | std::strong_ordering operator<=>(const Field& rhs) const; |
287 | | |
288 | | std::string_view as_string_view() const; |
289 | | |
290 | | // Return a human-readable representation of the stored value for debugging. |
291 | | // Unlike get_type_name() which returns the type, this prints the actual value. |
292 | | // For decimal types, caller can provide scale for accurate formatting. |
293 | | std::string to_debug_string(int scale) const; |
294 | | |
295 | | private: |
296 | | std::aligned_union_t<DBMS_MIN_FIELD_SIZE - sizeof(PrimitiveType), Null, UInt64, UInt128, Int64, |
297 | | Int128, IPv6, Float64, String, JsonbField, StringView, Array, Struct, Map, |
298 | | VariantField, Decimal32, Decimal64, DecimalV2Value, Decimal128V3, |
299 | | Decimal256, BitmapValue, HyperLogLog, QuantileState> |
300 | | storage; |
301 | | |
302 | | PrimitiveType type; |
303 | | |
304 | | /// Assuming there was no allocated state or it was deallocated (see destroy). |
305 | | template <PrimitiveType Type> |
306 | | void create_concrete(typename PrimitiveTypeTraits<Type>::CppType&& x); |
307 | | template <PrimitiveType Type> |
308 | | void create_concrete(const typename PrimitiveTypeTraits<Type>::CppType& x); |
309 | | /// Assuming same types. |
310 | | template <PrimitiveType Type> |
311 | | void assign_concrete(typename PrimitiveTypeTraits<Type>::CppType&& x); |
312 | | template <PrimitiveType Type> |
313 | | void assign_concrete(const typename PrimitiveTypeTraits<Type>::CppType& x); |
314 | | |
315 | | void create(const Field& field); |
316 | | void create(Field&& field); |
317 | | |
318 | | void assign(const Field& x); |
319 | | void assign(Field&& x); |
320 | | |
321 | | void destroy(); |
322 | | |
323 | | template <PrimitiveType T> |
324 | | void destroy(); |
325 | | }; |
326 | | |
327 | | struct FieldWithDataType { |
328 | | Field field; |
329 | | // used for nested type of array |
330 | | PrimitiveType base_scalar_type_id = PrimitiveType::INVALID_TYPE; |
331 | | uint8_t num_dimensions = 0; |
332 | | int precision = -1; |
333 | | int scale = -1; |
334 | | // True when the array elements are mixed-type and must be converted to the common base |
335 | | // type on insert. Mirrors FieldInfo::need_convert so it survives the FieldWithDataType |
336 | | // round trip in the sparse read path. |
337 | | bool need_convert = false; |
338 | | }; |
339 | | |
340 | | } // namespace doris |
341 | | |
342 | | template <> |
343 | | struct std::hash<doris::Field> { |
344 | 1.60k | size_t operator()(const doris::Field& field) const { |
345 | 1.60k | if (field.is_null()) { |
346 | 151 | return 0; |
347 | 151 | } |
348 | 1.45k | std::hash<std::string_view> hasher; |
349 | 1.45k | return hasher(field.as_string_view()); |
350 | 1.60k | } |
351 | | }; |