/root/doris/be/src/cloud/pb_convert.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #include "cloud/pb_convert.h" |
19 | | |
20 | | #include <common/logging.h> |
21 | | #include <gen_cpp/olap_file.pb.h> |
22 | | |
23 | | #include <utility> |
24 | | |
25 | | namespace doris::cloud { |
26 | | |
27 | 0 | RowsetMetaCloudPB doris_rowset_meta_to_cloud(const RowsetMetaPB& in) { |
28 | 0 | RowsetMetaCloudPB out; |
29 | 0 | doris_rowset_meta_to_cloud(&out, in); |
30 | 0 | return out; |
31 | 0 | } |
32 | | |
33 | 0 | RowsetMetaCloudPB doris_rowset_meta_to_cloud(RowsetMetaPB&& in) { |
34 | 0 | RowsetMetaCloudPB out; |
35 | 0 | doris_rowset_meta_to_cloud(&out, std::move(in)); |
36 | 0 | return out; |
37 | 0 | } |
38 | | |
39 | 0 | void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, const RowsetMetaPB& in) { |
40 | | // ATTN: please keep the set order aligned with the definition of proto `TabletSchemaCloudPB`. |
41 | 0 | out->set_rowset_id(in.rowset_id()); |
42 | 0 | out->set_partition_id(in.partition_id()); |
43 | 0 | out->set_tablet_id(in.tablet_id()); |
44 | 0 | out->set_txn_id(in.txn_id()); |
45 | 0 | out->set_tablet_schema_hash(in.tablet_schema_hash()); |
46 | 0 | out->set_rowset_type(in.rowset_type()); |
47 | 0 | out->set_rowset_state(in.rowset_state()); |
48 | 0 | out->set_start_version(in.start_version()); |
49 | 0 | out->set_end_version(in.end_version()); |
50 | 0 | out->set_version_hash(in.version_hash()); |
51 | 0 | out->set_num_rows(in.num_rows()); |
52 | 0 | out->set_total_disk_size(in.total_disk_size()); |
53 | 0 | out->set_data_disk_size(in.data_disk_size()); |
54 | 0 | out->set_index_disk_size(in.index_disk_size()); |
55 | 0 | out->mutable_zone_maps()->CopyFrom(in.zone_maps()); |
56 | 0 | if (in.has_delete_predicate()) { |
57 | 0 | out->mutable_delete_predicate()->CopyFrom(in.delete_predicate()); |
58 | 0 | } |
59 | 0 | out->set_empty(in.empty()); |
60 | 0 | if (in.has_load_id()) { |
61 | 0 | out->mutable_load_id()->CopyFrom(in.load_id()); |
62 | 0 | } |
63 | 0 | out->set_delete_flag(in.delete_flag()); |
64 | 0 | out->set_creation_time(in.creation_time()); |
65 | 0 | if (in.has_tablet_uid()) { |
66 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
67 | 0 | } |
68 | 0 | out->set_num_segments(in.num_segments()); |
69 | 0 | out->set_rowset_id_v2(in.rowset_id_v2()); |
70 | 0 | out->set_resource_id(in.resource_id()); |
71 | 0 | out->set_newest_write_timestamp(in.newest_write_timestamp()); |
72 | 0 | out->mutable_segments_key_bounds()->CopyFrom(in.segments_key_bounds()); |
73 | 0 | if (in.has_tablet_schema()) { |
74 | 0 | doris_tablet_schema_to_cloud(out->mutable_tablet_schema(), in.tablet_schema()); |
75 | 0 | } |
76 | 0 | out->set_txn_expiration(in.txn_expiration()); |
77 | 0 | out->set_segments_overlap_pb(in.segments_overlap_pb()); |
78 | 0 | out->mutable_segments_file_size()->CopyFrom(in.segments_file_size()); |
79 | 0 | out->set_index_id(in.index_id()); |
80 | 0 | if (in.has_schema_version()) { |
81 | | // See cloud/src/meta-service/meta_service_schema.cpp for details. |
82 | 0 | out->set_schema_version(in.schema_version()); |
83 | 0 | } |
84 | 0 | out->set_enable_segments_file_size(in.enable_segments_file_size()); |
85 | 0 | out->set_has_variant_type_in_schema(in.has_has_variant_type_in_schema()); |
86 | 0 | out->set_enable_inverted_index_file_info(in.enable_inverted_index_file_info()); |
87 | 0 | out->set_compaction_level(in.compaction_level()); |
88 | 0 | out->mutable_inverted_index_file_info()->CopyFrom(in.inverted_index_file_info()); |
89 | 0 | out->set_source_rowset_id(in.source_rowset_id()); |
90 | 0 | out->set_source_tablet_id(in.source_tablet_id()); |
91 | 0 | } |
92 | | |
93 | 0 | void doris_rowset_meta_to_cloud(RowsetMetaCloudPB* out, RowsetMetaPB&& in) { |
94 | | // ATTN: please keep the set order aligned with the definition of proto `TabletSchemaCloudPB`. |
95 | 0 | out->set_rowset_id(in.rowset_id()); |
96 | 0 | out->set_partition_id(in.partition_id()); |
97 | 0 | out->set_tablet_id(in.tablet_id()); |
98 | 0 | out->set_txn_id(in.txn_id()); |
99 | 0 | out->set_tablet_schema_hash(in.tablet_schema_hash()); |
100 | 0 | out->set_rowset_type(in.rowset_type()); |
101 | 0 | out->set_rowset_state(in.rowset_state()); |
102 | 0 | out->set_start_version(in.start_version()); |
103 | 0 | out->set_end_version(in.end_version()); |
104 | 0 | out->set_version_hash(in.version_hash()); |
105 | 0 | out->set_num_rows(in.num_rows()); |
106 | 0 | out->set_total_disk_size(in.total_disk_size()); |
107 | 0 | out->set_data_disk_size(in.data_disk_size()); |
108 | 0 | out->set_index_disk_size(in.index_disk_size()); |
109 | 0 | out->mutable_zone_maps()->Swap(in.mutable_zone_maps()); |
110 | 0 | if (in.has_delete_predicate()) { |
111 | 0 | out->mutable_delete_predicate()->Swap(in.mutable_delete_predicate()); |
112 | 0 | } |
113 | 0 | out->set_empty(in.empty()); |
114 | 0 | if (in.has_load_id()) { |
115 | 0 | out->mutable_load_id()->CopyFrom(in.load_id()); |
116 | 0 | } |
117 | 0 | out->set_delete_flag(in.delete_flag()); |
118 | 0 | out->set_creation_time(in.creation_time()); |
119 | 0 | if (in.has_tablet_uid()) { |
120 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
121 | 0 | } |
122 | 0 | out->set_num_segments(in.num_segments()); |
123 | 0 | out->set_rowset_id_v2(in.rowset_id_v2()); |
124 | 0 | out->set_resource_id(in.resource_id()); |
125 | 0 | out->set_newest_write_timestamp(in.newest_write_timestamp()); |
126 | 0 | out->mutable_segments_key_bounds()->Swap(in.mutable_segments_key_bounds()); |
127 | 0 | if (in.has_tablet_schema()) { |
128 | 0 | doris_tablet_schema_to_cloud(out->mutable_tablet_schema(), |
129 | 0 | std::move(*in.mutable_tablet_schema())); |
130 | 0 | } |
131 | 0 | out->set_txn_expiration(in.txn_expiration()); |
132 | 0 | out->set_segments_overlap_pb(in.segments_overlap_pb()); |
133 | 0 | out->mutable_segments_file_size()->Swap(in.mutable_segments_file_size()); |
134 | 0 | out->set_index_id(in.index_id()); |
135 | 0 | if (in.has_schema_version()) { |
136 | | // See cloud/src/meta-service/meta_service_schema.cpp for details. |
137 | 0 | out->set_schema_version(in.schema_version()); |
138 | 0 | } |
139 | 0 | out->set_enable_segments_file_size(in.enable_segments_file_size()); |
140 | 0 | out->set_has_variant_type_in_schema(in.has_variant_type_in_schema()); |
141 | 0 | out->set_enable_inverted_index_file_info(in.enable_inverted_index_file_info()); |
142 | 0 | out->set_compaction_level(in.compaction_level()); |
143 | 0 | out->mutable_inverted_index_file_info()->Swap(in.mutable_inverted_index_file_info()); |
144 | 0 | out->set_source_rowset_id(in.source_rowset_id()); |
145 | 0 | out->set_source_tablet_id(in.source_tablet_id()); |
146 | 0 | } |
147 | | |
148 | | static void fill_schema_with_dict(const RowsetMetaCloudPB& in, RowsetMetaPB* out, |
149 | 0 | const SchemaCloudDictionary& dict) { |
150 | 0 | std::unordered_map<int32_t, ColumnPB*> unique_id_map; |
151 | | //init map |
152 | 0 | for (ColumnPB& column : *out->mutable_tablet_schema()->mutable_column()) { |
153 | 0 | unique_id_map[column.unique_id()] = &column; |
154 | 0 | } |
155 | | // column info |
156 | 0 | for (size_t i = 0; i < in.schema_dict_key_list().column_dict_key_list_size(); ++i) { |
157 | 0 | int dict_key = in.schema_dict_key_list().column_dict_key_list(i); |
158 | 0 | const ColumnPB& dict_val = dict.column_dict().at(dict_key); |
159 | 0 | ColumnPB& to_add = *out->mutable_tablet_schema()->add_column(); |
160 | 0 | to_add = dict_val; |
161 | 0 | VLOG_DEBUG << "fill dict column " << dict_val.ShortDebugString(); |
162 | 0 | } |
163 | | |
164 | | // index info |
165 | 0 | for (size_t i = 0; i < in.schema_dict_key_list().index_info_dict_key_list_size(); ++i) { |
166 | 0 | int dict_key = in.schema_dict_key_list().index_info_dict_key_list(i); |
167 | 0 | const TabletIndexPB& dict_val = dict.index_dict().at(dict_key); |
168 | 0 | *out->mutable_tablet_schema()->add_index() = dict_val; |
169 | 0 | VLOG_DEBUG << "fill dict index " << dict_val.ShortDebugString(); |
170 | 0 | } |
171 | | |
172 | | // sparse column info |
173 | 0 | for (size_t i = 0; i < in.schema_dict_key_list().sparse_column_dict_key_list_size(); ++i) { |
174 | 0 | int dict_key = in.schema_dict_key_list().sparse_column_dict_key_list(i); |
175 | 0 | const ColumnPB& dict_val = dict.column_dict().at(dict_key); |
176 | 0 | *unique_id_map.at(dict_val.parent_unique_id())->add_sparse_columns() = dict_val; |
177 | 0 | VLOG_DEBUG << "fill dict sparse column" << dict_val.ShortDebugString(); |
178 | 0 | } |
179 | 0 | } |
180 | | |
181 | | RowsetMetaPB cloud_rowset_meta_to_doris(const RowsetMetaCloudPB& in, |
182 | 0 | const SchemaCloudDictionary* dict) { |
183 | 0 | RowsetMetaPB out; |
184 | 0 | cloud_rowset_meta_to_doris(&out, in, dict); |
185 | 0 | return out; |
186 | 0 | } |
187 | | |
188 | 0 | RowsetMetaPB cloud_rowset_meta_to_doris(RowsetMetaCloudPB&& in, const SchemaCloudDictionary* dict) { |
189 | 0 | RowsetMetaPB out; |
190 | 0 | cloud_rowset_meta_to_doris(&out, std::move(in), dict); |
191 | 0 | return out; |
192 | 0 | } |
193 | | |
194 | | void cloud_rowset_meta_to_doris(RowsetMetaPB* out, const RowsetMetaCloudPB& in, |
195 | 0 | const SchemaCloudDictionary* dict) { |
196 | | // ATTN: please keep the set order aligned with the definition of proto `TabletSchemaCloudPB`. |
197 | 0 | out->set_rowset_id(in.rowset_id()); |
198 | 0 | out->set_partition_id(in.partition_id()); |
199 | 0 | out->set_tablet_id(in.tablet_id()); |
200 | 0 | out->set_txn_id(in.txn_id()); |
201 | 0 | out->set_tablet_schema_hash(in.tablet_schema_hash()); |
202 | 0 | out->set_rowset_type(in.rowset_type()); |
203 | 0 | out->set_rowset_state(in.rowset_state()); |
204 | 0 | out->set_start_version(in.start_version()); |
205 | 0 | out->set_end_version(in.end_version()); |
206 | 0 | out->set_version_hash(in.version_hash()); |
207 | 0 | out->set_num_rows(in.num_rows()); |
208 | 0 | out->set_total_disk_size(in.total_disk_size()); |
209 | 0 | out->set_data_disk_size(in.data_disk_size()); |
210 | 0 | out->set_index_disk_size(in.index_disk_size()); |
211 | 0 | out->mutable_zone_maps()->CopyFrom(in.zone_maps()); |
212 | 0 | if (in.has_delete_predicate()) { |
213 | 0 | out->mutable_delete_predicate()->CopyFrom(in.delete_predicate()); |
214 | 0 | } |
215 | 0 | out->set_empty(in.empty()); |
216 | 0 | out->mutable_load_id()->CopyFrom(in.load_id()); |
217 | 0 | out->set_delete_flag(in.delete_flag()); |
218 | 0 | out->set_creation_time(in.creation_time()); |
219 | 0 | if (in.has_tablet_uid()) { |
220 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
221 | 0 | } |
222 | 0 | out->set_num_segments(in.num_segments()); |
223 | 0 | out->set_rowset_id_v2(in.rowset_id_v2()); |
224 | 0 | out->set_resource_id(in.resource_id()); |
225 | 0 | out->set_newest_write_timestamp(in.newest_write_timestamp()); |
226 | 0 | out->mutable_segments_key_bounds()->CopyFrom(in.segments_key_bounds()); |
227 | 0 | if (in.has_tablet_schema()) { |
228 | 0 | cloud_tablet_schema_to_doris(out->mutable_tablet_schema(), in.tablet_schema()); |
229 | 0 | } |
230 | 0 | if (dict != nullptr) { |
231 | 0 | fill_schema_with_dict(in, out, *dict); |
232 | 0 | } |
233 | 0 | out->set_txn_expiration(in.txn_expiration()); |
234 | 0 | out->set_segments_overlap_pb(in.segments_overlap_pb()); |
235 | 0 | out->mutable_segments_file_size()->CopyFrom(in.segments_file_size()); |
236 | 0 | out->set_index_id(in.index_id()); |
237 | 0 | if (in.has_schema_version()) { |
238 | | // See cloud/src/meta-service/meta_service_schema.cpp for details. |
239 | 0 | out->set_schema_version(in.schema_version()); |
240 | 0 | } |
241 | 0 | out->set_enable_segments_file_size(in.enable_segments_file_size()); |
242 | 0 | out->set_enable_inverted_index_file_info(in.enable_inverted_index_file_info()); |
243 | 0 | out->set_compaction_level(in.compaction_level()); |
244 | 0 | out->mutable_inverted_index_file_info()->CopyFrom(in.inverted_index_file_info()); |
245 | 0 | out->set_source_rowset_id(in.source_rowset_id()); |
246 | 0 | out->set_source_tablet_id(in.source_tablet_id()); |
247 | 0 | } |
248 | | |
249 | | void cloud_rowset_meta_to_doris(RowsetMetaPB* out, RowsetMetaCloudPB&& in, |
250 | 0 | const SchemaCloudDictionary* dict) { |
251 | | // ATTN: please keep the set order aligned with the definition of proto `TabletSchemaCloudPB`. |
252 | 0 | out->set_rowset_id(in.rowset_id()); |
253 | 0 | out->set_partition_id(in.partition_id()); |
254 | 0 | out->set_tablet_id(in.tablet_id()); |
255 | 0 | out->set_txn_id(in.txn_id()); |
256 | 0 | out->set_tablet_schema_hash(in.tablet_schema_hash()); |
257 | 0 | out->set_rowset_type(in.rowset_type()); |
258 | 0 | out->set_rowset_state(in.rowset_state()); |
259 | 0 | out->set_start_version(in.start_version()); |
260 | 0 | out->set_end_version(in.end_version()); |
261 | 0 | out->set_version_hash(in.version_hash()); |
262 | 0 | out->set_num_rows(in.num_rows()); |
263 | 0 | out->set_total_disk_size(in.total_disk_size()); |
264 | 0 | out->set_data_disk_size(in.data_disk_size()); |
265 | 0 | out->set_index_disk_size(in.index_disk_size()); |
266 | 0 | out->mutable_zone_maps()->Swap(in.mutable_zone_maps()); |
267 | 0 | if (in.has_delete_predicate()) { |
268 | 0 | out->mutable_delete_predicate()->Swap(in.mutable_delete_predicate()); |
269 | 0 | } |
270 | 0 | out->set_empty(in.empty()); |
271 | 0 | out->mutable_load_id()->CopyFrom(in.load_id()); |
272 | 0 | out->set_delete_flag(in.delete_flag()); |
273 | 0 | out->set_creation_time(in.creation_time()); |
274 | 0 | if (in.has_tablet_uid()) { |
275 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
276 | 0 | } |
277 | 0 | out->set_num_segments(in.num_segments()); |
278 | 0 | out->set_rowset_id_v2(in.rowset_id_v2()); |
279 | 0 | out->set_resource_id(in.resource_id()); |
280 | 0 | out->set_newest_write_timestamp(in.newest_write_timestamp()); |
281 | 0 | out->mutable_segments_key_bounds()->Swap(in.mutable_segments_key_bounds()); |
282 | 0 | if (in.has_tablet_schema()) { |
283 | 0 | cloud_tablet_schema_to_doris(out->mutable_tablet_schema(), |
284 | 0 | std::move(*in.mutable_tablet_schema())); |
285 | 0 | } |
286 | 0 | if (dict != nullptr) { |
287 | 0 | fill_schema_with_dict(in, out, *dict); |
288 | 0 | } |
289 | 0 | out->set_txn_expiration(in.txn_expiration()); |
290 | 0 | out->set_segments_overlap_pb(in.segments_overlap_pb()); |
291 | 0 | out->mutable_segments_file_size()->Swap(in.mutable_segments_file_size()); |
292 | 0 | out->set_index_id(in.index_id()); |
293 | 0 | if (in.has_schema_version()) { |
294 | | // See cloud/src/meta-service/meta_service_schema.cpp for details. |
295 | 0 | out->set_schema_version(in.schema_version()); |
296 | 0 | } |
297 | 0 | out->set_enable_segments_file_size(in.enable_segments_file_size()); |
298 | 0 | out->set_enable_inverted_index_file_info(in.enable_inverted_index_file_info()); |
299 | 0 | out->set_compaction_level(in.compaction_level()); |
300 | 0 | out->mutable_inverted_index_file_info()->Swap(in.mutable_inverted_index_file_info()); |
301 | 0 | out->set_source_rowset_id(in.source_rowset_id()); |
302 | 0 | out->set_source_tablet_id(in.source_tablet_id()); |
303 | 0 | } |
304 | | |
305 | 0 | TabletSchemaCloudPB doris_tablet_schema_to_cloud(const TabletSchemaPB& in) { |
306 | 0 | TabletSchemaCloudPB out; |
307 | 0 | doris_tablet_schema_to_cloud(&out, in); |
308 | 0 | return out; |
309 | 0 | } |
310 | | |
311 | 0 | TabletSchemaCloudPB doris_tablet_schema_to_cloud(TabletSchemaPB&& in) { |
312 | | // ATTN: please keep the set order aligned with the definition of proto. |
313 | 0 | TabletSchemaCloudPB out; |
314 | 0 | doris_tablet_schema_to_cloud(&out, std::move(in)); |
315 | 0 | return out; |
316 | 0 | } |
317 | | |
318 | 0 | void doris_tablet_schema_to_cloud(TabletSchemaCloudPB* out, const TabletSchemaPB& in) { |
319 | | // ATTN: please keep the set order aligned with the definition of proto. |
320 | 0 | out->set_keys_type(in.keys_type()); |
321 | 0 | out->mutable_column()->CopyFrom(in.column()); |
322 | 0 | out->set_num_short_key_columns(in.num_short_key_columns()); |
323 | 0 | out->set_num_rows_per_row_block(in.num_rows_per_row_block()); |
324 | 0 | out->set_compress_kind(in.compress_kind()); |
325 | 0 | out->set_bf_fpp(in.bf_fpp()); |
326 | 0 | out->set_next_column_unique_id(in.next_column_unique_id()); |
327 | 0 | out->set_delete_sign_idx(in.delete_sign_idx()); |
328 | 0 | out->set_sequence_col_idx(in.sequence_col_idx()); |
329 | 0 | out->set_sort_type(in.sort_type()); |
330 | 0 | out->set_sort_col_num(in.sort_col_num()); |
331 | 0 | out->set_compression_type(in.compression_type()); |
332 | 0 | out->set_schema_version(in.schema_version()); |
333 | 0 | out->set_disable_auto_compaction(in.disable_auto_compaction()); |
334 | 0 | out->mutable_index()->CopyFrom(in.index()); |
335 | 0 | out->set_version_col_idx(in.version_col_idx()); |
336 | 0 | out->set_store_row_column(in.store_row_column()); |
337 | 0 | out->set_enable_single_replica_compaction(in.enable_single_replica_compaction()); |
338 | 0 | out->set_skip_write_index_on_load(in.skip_write_index_on_load()); |
339 | 0 | out->mutable_cluster_key_uids()->CopyFrom(in.cluster_key_uids()); |
340 | 0 | out->set_is_dynamic_schema(in.is_dynamic_schema()); |
341 | 0 | out->mutable_row_store_column_unique_ids()->CopyFrom(in.row_store_column_unique_ids()); |
342 | 0 | out->set_inverted_index_storage_format(in.inverted_index_storage_format()); |
343 | 0 | out->set_enable_variant_flatten_nested(in.variant_enable_flatten_nested()); |
344 | 0 | out->set_skip_bitmap_col_idx(in.skip_bitmap_col_idx()); |
345 | 0 | out->set_storage_page_size(in.storage_page_size()); |
346 | 0 | } |
347 | | |
348 | 0 | void doris_tablet_schema_to_cloud(TabletSchemaCloudPB* out, TabletSchemaPB&& in) { |
349 | 0 | out->set_keys_type(in.keys_type()); |
350 | 0 | out->mutable_column()->Swap(in.mutable_column()); |
351 | 0 | out->set_num_short_key_columns(in.num_short_key_columns()); |
352 | 0 | out->set_num_rows_per_row_block(in.num_rows_per_row_block()); |
353 | 0 | out->set_compress_kind(in.compress_kind()); |
354 | 0 | out->set_bf_fpp(in.bf_fpp()); |
355 | 0 | out->set_next_column_unique_id(in.next_column_unique_id()); |
356 | 0 | out->set_delete_sign_idx(in.delete_sign_idx()); |
357 | 0 | out->set_sequence_col_idx(in.sequence_col_idx()); |
358 | 0 | out->set_sort_type(in.sort_type()); |
359 | 0 | out->set_sort_col_num(in.sort_col_num()); |
360 | 0 | out->set_compression_type(in.compression_type()); |
361 | 0 | out->set_schema_version(in.schema_version()); |
362 | 0 | out->set_disable_auto_compaction(in.disable_auto_compaction()); |
363 | 0 | out->mutable_index()->Swap(in.mutable_index()); |
364 | 0 | out->set_version_col_idx(in.version_col_idx()); |
365 | 0 | out->set_store_row_column(in.store_row_column()); |
366 | 0 | out->set_enable_single_replica_compaction(in.enable_single_replica_compaction()); |
367 | 0 | out->set_skip_write_index_on_load(in.skip_write_index_on_load()); |
368 | 0 | out->mutable_cluster_key_uids()->Swap(in.mutable_cluster_key_uids()); |
369 | 0 | out->set_is_dynamic_schema(in.is_dynamic_schema()); |
370 | 0 | out->mutable_row_store_column_unique_ids()->Swap(in.mutable_row_store_column_unique_ids()); |
371 | 0 | out->set_inverted_index_storage_format(in.inverted_index_storage_format()); |
372 | 0 | out->set_enable_variant_flatten_nested(in.variant_enable_flatten_nested()); |
373 | 0 | out->set_skip_bitmap_col_idx(in.skip_bitmap_col_idx()); |
374 | 0 | out->set_storage_page_size(in.storage_page_size()); |
375 | 0 | } |
376 | | |
377 | 0 | TabletSchemaPB cloud_tablet_schema_to_doris(const TabletSchemaCloudPB& in) { |
378 | 0 | TabletSchemaPB out; |
379 | 0 | cloud_tablet_schema_to_doris(&out, in); |
380 | 0 | return out; |
381 | 0 | } |
382 | | |
383 | 0 | TabletSchemaPB cloud_tablet_schema_to_doris(TabletSchemaCloudPB&& in) { |
384 | 0 | TabletSchemaPB out; |
385 | 0 | cloud_tablet_schema_to_doris(&out, std::move(in)); |
386 | 0 | return out; |
387 | 0 | } |
388 | | |
389 | 0 | void cloud_tablet_schema_to_doris(TabletSchemaPB* out, const TabletSchemaCloudPB& in) { |
390 | | // ATTN: please keep the set order aligned with the definition of proto. |
391 | 0 | out->set_keys_type(in.keys_type()); |
392 | 0 | out->mutable_column()->CopyFrom(in.column()); |
393 | 0 | out->set_num_short_key_columns(in.num_short_key_columns()); |
394 | 0 | out->set_num_rows_per_row_block(in.num_rows_per_row_block()); |
395 | 0 | out->set_compress_kind(in.compress_kind()); |
396 | 0 | out->set_bf_fpp(in.bf_fpp()); |
397 | 0 | out->set_next_column_unique_id(in.next_column_unique_id()); |
398 | 0 | out->set_delete_sign_idx(in.delete_sign_idx()); |
399 | 0 | out->set_sequence_col_idx(in.sequence_col_idx()); |
400 | 0 | out->set_sort_type(in.sort_type()); |
401 | 0 | out->set_sort_col_num(in.sort_col_num()); |
402 | 0 | out->set_compression_type(in.compression_type()); |
403 | 0 | out->set_schema_version(in.schema_version()); |
404 | 0 | out->set_disable_auto_compaction(in.disable_auto_compaction()); |
405 | 0 | out->mutable_index()->CopyFrom(in.index()); |
406 | 0 | out->set_version_col_idx(in.version_col_idx()); |
407 | 0 | out->set_store_row_column(in.store_row_column()); |
408 | 0 | out->set_enable_single_replica_compaction(in.enable_single_replica_compaction()); |
409 | 0 | out->set_skip_write_index_on_load(in.skip_write_index_on_load()); |
410 | 0 | out->mutable_cluster_key_uids()->CopyFrom(in.cluster_key_uids()); |
411 | 0 | out->set_is_dynamic_schema(in.is_dynamic_schema()); |
412 | 0 | out->mutable_row_store_column_unique_ids()->CopyFrom(in.row_store_column_unique_ids()); |
413 | 0 | out->set_inverted_index_storage_format(in.inverted_index_storage_format()); |
414 | 0 | out->set_variant_enable_flatten_nested(in.enable_variant_flatten_nested()); |
415 | 0 | out->set_skip_bitmap_col_idx(in.skip_bitmap_col_idx()); |
416 | 0 | out->set_storage_page_size(in.storage_page_size()); |
417 | 0 | } |
418 | | |
419 | 0 | void cloud_tablet_schema_to_doris(TabletSchemaPB* out, TabletSchemaCloudPB&& in) { |
420 | | // ATTN: please keep the set order aligned with the definition of proto. |
421 | 0 | out->set_keys_type(in.keys_type()); |
422 | 0 | out->mutable_column()->Swap(in.mutable_column()); |
423 | 0 | out->set_num_short_key_columns(in.num_short_key_columns()); |
424 | 0 | out->set_num_rows_per_row_block(in.num_rows_per_row_block()); |
425 | 0 | out->set_compress_kind(in.compress_kind()); |
426 | 0 | out->set_bf_fpp(in.bf_fpp()); |
427 | 0 | out->set_next_column_unique_id(in.next_column_unique_id()); |
428 | 0 | out->set_delete_sign_idx(in.delete_sign_idx()); |
429 | 0 | out->set_sequence_col_idx(in.sequence_col_idx()); |
430 | 0 | out->set_sort_type(in.sort_type()); |
431 | 0 | out->set_sort_col_num(in.sort_col_num()); |
432 | 0 | out->set_compression_type(in.compression_type()); |
433 | 0 | out->set_schema_version(in.schema_version()); |
434 | 0 | out->set_disable_auto_compaction(in.disable_auto_compaction()); |
435 | 0 | out->mutable_index()->Swap(in.mutable_index()); |
436 | 0 | out->set_version_col_idx(in.version_col_idx()); |
437 | 0 | out->set_store_row_column(in.store_row_column()); |
438 | 0 | out->set_enable_single_replica_compaction(in.enable_single_replica_compaction()); |
439 | 0 | out->set_skip_write_index_on_load(in.skip_write_index_on_load()); |
440 | 0 | out->mutable_cluster_key_uids()->Swap(in.mutable_cluster_key_uids()); |
441 | 0 | out->set_is_dynamic_schema(in.is_dynamic_schema()); |
442 | 0 | out->mutable_row_store_column_unique_ids()->Swap(in.mutable_row_store_column_unique_ids()); |
443 | 0 | out->set_inverted_index_storage_format(in.inverted_index_storage_format()); |
444 | 0 | out->set_variant_enable_flatten_nested(in.enable_variant_flatten_nested()); |
445 | 0 | out->set_skip_bitmap_col_idx(in.skip_bitmap_col_idx()); |
446 | 0 | out->set_storage_page_size(in.storage_page_size()); |
447 | 0 | } |
448 | | |
449 | 0 | TabletMetaCloudPB doris_tablet_meta_to_cloud(const TabletMetaPB& in) { |
450 | 0 | TabletMetaCloudPB out; |
451 | 0 | doris_tablet_meta_to_cloud(&out, in); |
452 | 0 | return out; |
453 | 0 | } |
454 | | |
455 | 0 | TabletMetaCloudPB doris_tablet_meta_to_cloud(TabletMetaPB&& in) { |
456 | 0 | TabletMetaCloudPB out; |
457 | 0 | doris_tablet_meta_to_cloud(&out, std::move(in)); |
458 | 0 | return out; |
459 | 0 | } |
460 | | |
461 | 0 | void doris_tablet_meta_to_cloud(TabletMetaCloudPB* out, const TabletMetaPB& in) { |
462 | | // ATTN: please keep the set order aligned with the definition of proto. |
463 | 0 | out->set_table_id(in.table_id()); |
464 | 0 | out->set_partition_id(in.partition_id()); |
465 | 0 | out->set_tablet_id(in.tablet_id()); |
466 | 0 | out->set_schema_hash(in.schema_hash()); |
467 | 0 | out->set_shard_id(in.shard_id()); |
468 | 0 | out->set_creation_time(in.creation_time()); |
469 | 0 | out->set_cumulative_layer_point(in.cumulative_layer_point()); |
470 | 0 | out->set_tablet_state(in.tablet_state()); |
471 | 0 | if (in.has_schema()) { |
472 | 0 | doris_tablet_schema_to_cloud(out->mutable_schema(), in.schema()); |
473 | 0 | } |
474 | 0 | if (in.rs_metas_size()) { |
475 | 0 | out->mutable_rs_metas()->Reserve(in.rs_metas_size()); |
476 | 0 | for (const auto& rs_meta : in.rs_metas()) { |
477 | 0 | doris_rowset_meta_to_cloud(out->add_rs_metas(), rs_meta); |
478 | 0 | } |
479 | 0 | } |
480 | | // ATTN: inc_rs_metas are deprecated, ignored here. |
481 | 0 | if (in.has_alter_task()) { |
482 | 0 | out->mutable_alter_task()->CopyFrom(in.alter_task()); |
483 | 0 | } |
484 | 0 | out->set_in_restore_mode(in.in_restore_mode()); |
485 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
486 | 0 | out->set_end_rowset_id(in.end_rowset_id()); |
487 | 0 | out->set_preferred_rowset_type(in.preferred_rowset_type()); |
488 | 0 | out->set_tablet_type(in.tablet_type()); |
489 | 0 | if (in.stale_rs_metas_size()) { |
490 | 0 | out->mutable_stale_rs_metas()->Reserve(in.stale_rs_metas_size()); |
491 | 0 | for (const auto& rs_meta : in.stale_rs_metas()) { |
492 | 0 | doris_rowset_meta_to_cloud(out->add_stale_rs_metas(), rs_meta); |
493 | 0 | } |
494 | 0 | } |
495 | 0 | out->set_replica_id(in.replica_id()); |
496 | 0 | if (in.has_delete_bitmap()) { |
497 | 0 | out->mutable_delete_bitmap()->CopyFrom(in.delete_bitmap()); |
498 | 0 | } |
499 | 0 | out->set_enable_unique_key_merge_on_write(in.enable_unique_key_merge_on_write()); |
500 | 0 | out->set_storage_policy_id(in.storage_policy_id()); |
501 | 0 | out->mutable_cooldown_meta_id()->CopyFrom(in.cooldown_meta_id()); |
502 | 0 | if (in.has_binlog_config()) { |
503 | 0 | out->mutable_binlog_config()->CopyFrom(in.binlog_config()); |
504 | 0 | } |
505 | 0 | out->set_compaction_policy(in.compaction_policy()); |
506 | 0 | out->set_time_series_compaction_goal_size_mbytes(in.time_series_compaction_goal_size_mbytes()); |
507 | 0 | out->set_time_series_compaction_file_count_threshold( |
508 | 0 | in.time_series_compaction_file_count_threshold()); |
509 | 0 | out->set_time_series_compaction_time_threshold_seconds( |
510 | 0 | in.time_series_compaction_time_threshold_seconds()); |
511 | 0 | out->set_time_series_compaction_empty_rowsets_threshold( |
512 | 0 | in.time_series_compaction_empty_rowsets_threshold()); |
513 | 0 | out->set_time_series_compaction_level_threshold(in.time_series_compaction_level_threshold()); |
514 | 0 | out->set_index_id(in.index_id()); |
515 | 0 | out->set_is_in_memory(in.is_in_memory()); |
516 | 0 | out->set_is_persistent(in.is_persistent()); |
517 | 0 | out->set_table_name(in.table_name()); |
518 | 0 | out->set_ttl_seconds(in.ttl_seconds()); |
519 | 0 | if (in.has_schema_version()) { |
520 | 0 | out->set_schema_version(in.schema_version()); |
521 | 0 | } |
522 | 0 | } |
523 | | |
524 | 0 | void doris_tablet_meta_to_cloud(TabletMetaCloudPB* out, TabletMetaPB&& in) { |
525 | | // ATTN: please keep the set order aligned with the definition of proto. |
526 | 0 | out->set_table_id(in.table_id()); |
527 | 0 | out->set_partition_id(in.partition_id()); |
528 | 0 | out->set_tablet_id(in.tablet_id()); |
529 | 0 | out->set_schema_hash(in.schema_hash()); |
530 | 0 | out->set_shard_id(in.shard_id()); |
531 | 0 | out->set_creation_time(in.creation_time()); |
532 | 0 | out->set_cumulative_layer_point(in.cumulative_layer_point()); |
533 | 0 | out->set_tablet_state(in.tablet_state()); |
534 | 0 | if (in.has_schema()) { |
535 | 0 | doris_tablet_schema_to_cloud(out->mutable_schema(), std::move(*in.mutable_schema())); |
536 | 0 | } |
537 | 0 | if (in.rs_metas_size()) { |
538 | 0 | size_t rs_metas_size = in.rs_metas_size(); |
539 | 0 | out->mutable_rs_metas()->Reserve(rs_metas_size); |
540 | 0 | for (size_t i = 0; i < rs_metas_size; ++i) { |
541 | 0 | doris_rowset_meta_to_cloud(out->add_rs_metas(), std::move(*in.mutable_rs_metas(i))); |
542 | 0 | } |
543 | 0 | } |
544 | | // ATTN: inc_rs_metas are deprecated, ignored here. |
545 | 0 | if (in.has_alter_task()) { |
546 | 0 | out->mutable_alter_task()->Swap(in.mutable_alter_task()); |
547 | 0 | } |
548 | 0 | out->set_in_restore_mode(in.in_restore_mode()); |
549 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
550 | 0 | out->set_end_rowset_id(in.end_rowset_id()); |
551 | 0 | out->set_preferred_rowset_type(in.preferred_rowset_type()); |
552 | 0 | out->set_tablet_type(in.tablet_type()); |
553 | 0 | if (in.stale_rs_metas_size()) { |
554 | 0 | size_t rs_metas_size = in.stale_rs_metas_size(); |
555 | 0 | out->mutable_stale_rs_metas()->Reserve(rs_metas_size); |
556 | 0 | for (size_t i = 0; i < rs_metas_size; i++) { |
557 | 0 | doris_rowset_meta_to_cloud(out->add_stale_rs_metas(), |
558 | 0 | std::move(*in.mutable_stale_rs_metas(i))); |
559 | 0 | } |
560 | 0 | } |
561 | 0 | out->set_replica_id(in.replica_id()); |
562 | 0 | if (in.has_delete_bitmap()) { |
563 | 0 | out->mutable_delete_bitmap()->Swap(in.mutable_delete_bitmap()); |
564 | 0 | } |
565 | 0 | out->set_enable_unique_key_merge_on_write(in.enable_unique_key_merge_on_write()); |
566 | 0 | out->set_storage_policy_id(in.storage_policy_id()); |
567 | 0 | out->mutable_cooldown_meta_id()->CopyFrom(in.cooldown_meta_id()); |
568 | 0 | if (in.has_binlog_config()) { |
569 | 0 | out->mutable_binlog_config()->Swap(in.mutable_binlog_config()); |
570 | 0 | } |
571 | 0 | out->set_compaction_policy(in.compaction_policy()); |
572 | 0 | out->set_time_series_compaction_goal_size_mbytes(in.time_series_compaction_goal_size_mbytes()); |
573 | 0 | out->set_time_series_compaction_file_count_threshold( |
574 | 0 | in.time_series_compaction_file_count_threshold()); |
575 | 0 | out->set_time_series_compaction_time_threshold_seconds( |
576 | 0 | in.time_series_compaction_time_threshold_seconds()); |
577 | 0 | out->set_time_series_compaction_empty_rowsets_threshold( |
578 | 0 | in.time_series_compaction_empty_rowsets_threshold()); |
579 | 0 | out->set_time_series_compaction_level_threshold(in.time_series_compaction_level_threshold()); |
580 | 0 | out->set_index_id(in.index_id()); |
581 | 0 | out->set_is_in_memory(in.is_in_memory()); |
582 | 0 | out->set_is_persistent(in.is_persistent()); |
583 | 0 | out->set_table_name(in.table_name()); |
584 | 0 | out->set_ttl_seconds(in.ttl_seconds()); |
585 | 0 | if (in.has_schema_version()) { |
586 | 0 | out->set_schema_version(in.schema_version()); |
587 | 0 | } |
588 | 0 | } |
589 | | |
590 | 0 | TabletMetaPB cloud_tablet_meta_to_doris(const TabletMetaCloudPB& in) { |
591 | 0 | TabletMetaPB out; |
592 | 0 | cloud_tablet_meta_to_doris(&out, in); |
593 | 0 | return out; |
594 | 0 | } |
595 | | |
596 | 0 | TabletMetaPB cloud_tablet_meta_to_doris(TabletMetaCloudPB&& in) { |
597 | 0 | TabletMetaPB out; |
598 | 0 | cloud_tablet_meta_to_doris(&out, std::move(in)); |
599 | 0 | return out; |
600 | 0 | } |
601 | | |
602 | 0 | void cloud_tablet_meta_to_doris(TabletMetaPB* out, const TabletMetaCloudPB& in) { |
603 | | // ATTN: please keep the set order aligned with the definition of proto. |
604 | 0 | out->set_table_id(in.table_id()); |
605 | 0 | out->set_partition_id(in.partition_id()); |
606 | 0 | out->set_tablet_id(in.tablet_id()); |
607 | 0 | out->set_schema_hash(in.schema_hash()); |
608 | 0 | out->set_shard_id(in.shard_id()); |
609 | 0 | out->set_creation_time(in.creation_time()); |
610 | 0 | out->set_cumulative_layer_point(in.cumulative_layer_point()); |
611 | 0 | out->set_tablet_state(in.tablet_state()); |
612 | 0 | if (in.has_schema()) { |
613 | 0 | cloud_tablet_schema_to_doris(out->mutable_schema(), in.schema()); |
614 | 0 | } |
615 | 0 | if (in.rs_metas_size()) { |
616 | 0 | out->mutable_rs_metas()->Reserve(in.rs_metas_size()); |
617 | 0 | for (const auto& rs_meta : in.rs_metas()) { |
618 | 0 | cloud_rowset_meta_to_doris(out->add_rs_metas(), rs_meta); |
619 | 0 | } |
620 | 0 | } |
621 | | // ATTN: inc_rs_metas are deprecated, ignored here. |
622 | 0 | if (in.has_alter_task()) { |
623 | 0 | out->mutable_alter_task()->CopyFrom(in.alter_task()); |
624 | 0 | } |
625 | 0 | out->set_in_restore_mode(in.in_restore_mode()); |
626 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
627 | 0 | out->set_end_rowset_id(in.end_rowset_id()); |
628 | 0 | out->set_preferred_rowset_type(in.preferred_rowset_type()); |
629 | 0 | out->set_tablet_type(in.tablet_type()); |
630 | 0 | if (in.stale_rs_metas_size()) { |
631 | 0 | out->mutable_stale_rs_metas()->Reserve(in.stale_rs_metas_size()); |
632 | 0 | for (const auto& rs_meta : in.stale_rs_metas()) { |
633 | 0 | cloud_rowset_meta_to_doris(out->add_stale_rs_metas(), rs_meta); |
634 | 0 | } |
635 | 0 | } |
636 | 0 | out->set_replica_id(in.replica_id()); |
637 | 0 | if (in.has_delete_bitmap()) { |
638 | 0 | out->mutable_delete_bitmap()->CopyFrom(in.delete_bitmap()); |
639 | 0 | } |
640 | 0 | out->set_enable_unique_key_merge_on_write(in.enable_unique_key_merge_on_write()); |
641 | 0 | out->set_storage_policy_id(in.storage_policy_id()); |
642 | 0 | out->mutable_cooldown_meta_id()->CopyFrom(in.cooldown_meta_id()); |
643 | 0 | if (in.has_binlog_config()) { |
644 | 0 | out->mutable_binlog_config()->CopyFrom(in.binlog_config()); |
645 | 0 | } |
646 | 0 | out->set_compaction_policy(in.compaction_policy()); |
647 | 0 | out->set_time_series_compaction_goal_size_mbytes(in.time_series_compaction_goal_size_mbytes()); |
648 | 0 | out->set_time_series_compaction_file_count_threshold( |
649 | 0 | in.time_series_compaction_file_count_threshold()); |
650 | 0 | out->set_time_series_compaction_time_threshold_seconds( |
651 | 0 | in.time_series_compaction_time_threshold_seconds()); |
652 | 0 | out->set_time_series_compaction_empty_rowsets_threshold( |
653 | 0 | in.time_series_compaction_empty_rowsets_threshold()); |
654 | 0 | out->set_time_series_compaction_level_threshold(in.time_series_compaction_level_threshold()); |
655 | 0 | out->set_index_id(in.index_id()); |
656 | 0 | out->set_is_in_memory(in.is_in_memory()); |
657 | 0 | out->set_is_persistent(in.is_persistent()); |
658 | 0 | out->set_table_name(in.table_name()); |
659 | 0 | out->set_ttl_seconds(in.ttl_seconds()); |
660 | 0 | if (in.has_schema_version()) { |
661 | 0 | out->set_schema_version(in.schema_version()); |
662 | 0 | } |
663 | 0 | } |
664 | | |
665 | 0 | void cloud_tablet_meta_to_doris(TabletMetaPB* out, TabletMetaCloudPB&& in) { |
666 | | // ATTN: please keep the set order aligned with the definition of proto. |
667 | 0 | out->set_table_id(in.table_id()); |
668 | 0 | out->set_partition_id(in.partition_id()); |
669 | 0 | out->set_tablet_id(in.tablet_id()); |
670 | 0 | out->set_schema_hash(in.schema_hash()); |
671 | 0 | out->set_shard_id(in.shard_id()); |
672 | 0 | out->set_creation_time(in.creation_time()); |
673 | 0 | out->set_cumulative_layer_point(in.cumulative_layer_point()); |
674 | 0 | out->set_tablet_state(in.tablet_state()); |
675 | 0 | if (in.has_schema()) { |
676 | 0 | cloud_tablet_schema_to_doris(out->mutable_schema(), std::move(*in.mutable_schema())); |
677 | 0 | } |
678 | 0 | if (in.rs_metas_size()) { |
679 | 0 | size_t rs_metas_size = in.rs_metas_size(); |
680 | 0 | out->mutable_rs_metas()->Reserve(rs_metas_size); |
681 | 0 | for (size_t i = 0; i < rs_metas_size; ++i) { |
682 | 0 | cloud_rowset_meta_to_doris(out->add_rs_metas(), std::move(*in.mutable_rs_metas(i))); |
683 | 0 | } |
684 | 0 | } |
685 | | // ATTN: inc_rs_metas are deprecated, ignored here. |
686 | 0 | if (in.has_alter_task()) { |
687 | 0 | out->mutable_alter_task()->Swap(in.mutable_alter_task()); |
688 | 0 | } |
689 | 0 | out->set_in_restore_mode(in.in_restore_mode()); |
690 | 0 | out->mutable_tablet_uid()->CopyFrom(in.tablet_uid()); |
691 | 0 | out->set_end_rowset_id(in.end_rowset_id()); |
692 | 0 | out->set_preferred_rowset_type(in.preferred_rowset_type()); |
693 | 0 | out->set_tablet_type(in.tablet_type()); |
694 | 0 | if (in.stale_rs_metas_size()) { |
695 | 0 | size_t rs_metas_size = in.stale_rs_metas_size(); |
696 | 0 | out->mutable_stale_rs_metas()->Reserve(rs_metas_size); |
697 | 0 | for (size_t i = 0; i < rs_metas_size; i++) { |
698 | 0 | cloud_rowset_meta_to_doris(out->add_stale_rs_metas(), |
699 | 0 | std::move(*in.mutable_stale_rs_metas(i))); |
700 | 0 | } |
701 | 0 | } |
702 | 0 | out->set_replica_id(in.replica_id()); |
703 | 0 | if (in.has_delete_bitmap()) { |
704 | 0 | out->mutable_delete_bitmap()->Swap(in.mutable_delete_bitmap()); |
705 | 0 | } |
706 | 0 | out->set_enable_unique_key_merge_on_write(in.enable_unique_key_merge_on_write()); |
707 | 0 | out->set_storage_policy_id(in.storage_policy_id()); |
708 | 0 | out->mutable_cooldown_meta_id()->CopyFrom(in.cooldown_meta_id()); |
709 | 0 | if (in.has_binlog_config()) { |
710 | 0 | out->mutable_binlog_config()->Swap(in.mutable_binlog_config()); |
711 | 0 | } |
712 | 0 | out->set_compaction_policy(in.compaction_policy()); |
713 | 0 | out->set_time_series_compaction_goal_size_mbytes(in.time_series_compaction_goal_size_mbytes()); |
714 | 0 | out->set_time_series_compaction_file_count_threshold( |
715 | 0 | in.time_series_compaction_file_count_threshold()); |
716 | 0 | out->set_time_series_compaction_time_threshold_seconds( |
717 | 0 | in.time_series_compaction_time_threshold_seconds()); |
718 | 0 | out->set_time_series_compaction_empty_rowsets_threshold( |
719 | 0 | in.time_series_compaction_empty_rowsets_threshold()); |
720 | 0 | out->set_time_series_compaction_level_threshold(in.time_series_compaction_level_threshold()); |
721 | 0 | out->set_index_id(in.index_id()); |
722 | 0 | out->set_is_in_memory(in.is_in_memory()); |
723 | 0 | out->set_is_persistent(in.is_persistent()); |
724 | 0 | out->set_table_name(in.table_name()); |
725 | 0 | out->set_ttl_seconds(in.ttl_seconds()); |
726 | 0 | if (in.has_schema_version()) { |
727 | 0 | out->set_schema_version(in.schema_version()); |
728 | 0 | } |
729 | 0 | } |
730 | | |
731 | | } // namespace doris::cloud |