iceberg-cpp
Loading...
Searching...
No Matches
parquet_schema_util_internal.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
22#include <optional>
23
24#include <parquet/arrow/schema.h>
25
26#include "iceberg/schema.h"
27#include "iceberg/schema_util.h"
28
29namespace iceberg::parquet {
30
34 ~ParquetExtraAttributes() override = default;
35
37 std::optional<int32_t> column_id;
38};
39
50Result<SchemaProjection> Project(const Schema& expected_schema,
51 const ::parquet::arrow::SchemaManifest& parquet_schema);
52
57std::vector<int32_t> SelectedColumnIndices(const SchemaProjection& projection);
58
63bool HasFieldIds(const ::parquet::schema::NodePtr& root_node);
64
65} // namespace iceberg::parquet
A schema for a Table.
Definition schema.h:49
Format-specific attributes for the field. For example, for Parquet it might store column id and level...
Definition schema_util.h:62
A schema partner to carry projection information.
Definition schema_util.h:77
Parquet specific attributes for the field.
Definition parquet_schema_util_internal.h:32
std::optional< int32_t > column_id
The column id of projected Parquet column.
Definition parquet_schema_util_internal.h:37