be/src/format/table/iceberg_scan_semantics.h
Line | Count | Source |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include "gen_cpp/PlanNodes_types.h" |
21 | | |
22 | | namespace doris { |
23 | | |
24 | | inline constexpr int32_t ICEBERG_SCAN_SEMANTICS_VERSION_1 = 1; |
25 | | |
26 | 355 | inline bool supports_iceberg_scan_semantics_v1(const TFileScanRangeParams* params) { |
27 | | // Old FE plans can carry IDs and encoded defaults too, so only this explicit version marker |
28 | | // may opt a new BE into result-changing semantics during a rolling upgrade. |
29 | 355 | return params != nullptr && params->__isset.iceberg_scan_semantics_version && |
30 | 355 | params->iceberg_scan_semantics_version >= ICEBERG_SCAN_SEMANTICS_VERSION_1; |
31 | 355 | } |
32 | | |
33 | | } // namespace doris |