| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| |
| #pragma once |
| |
| #include <cstddef> |
| #include <cstdint> |
| |
| #include "roaring/roaring64map.hh" |
| |
| namespace doris { |
| |
| // Doris materializes an Iceberg deletion vector as one buffer. This is an implementation limit, |
| // not an Iceberg format limit. |
| inline constexpr int64_t MAX_ICEBERG_DELETION_VECTOR_BYTES = 1L << 30; |
| inline constexpr size_t ICEBERG_DELETION_VECTOR_BLOB_OVERHEAD_BYTES = 12; |
| |
| // Paimon v1 uses a run-optimized 32-bit Roaring bitmap whose maximum serialized size is below this |
| // limit. Keep its guard independent from the Iceberg capability limit. |
| inline constexpr int64_t MAX_PAIMON_DELETION_VECTOR_BYTES = 1L << 30; |
| |
| // A deletion vector is already a bitmap on the wire. Keep decoded DVs compressed in the |
| // query-local cache instead of expanding every set bit into an int64_t. Position delete files use |
| // a different representation because their input is a stream of (file_path, row_position) rows. |
| using DeletionVector = roaring::Roaring64Map; |
| |
| } // namespace doris |