iceberg-cpp
Loading...
Searching...
No Matches
avro_reader.h
Go to the documentation of this file.
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
24
25#include "iceberg/file_reader.h"
27
28namespace iceberg::avro {
29
31class ICEBERG_BUNDLE_EXPORT AvroReader : public Reader {
32 public:
33 AvroReader() = default;
34
35 ~AvroReader() override;
36
37 Status Open(const ReaderOptions& options) final;
38
39 Status Close() final;
40
41 Result<std::optional<ArrowArray>> Next() final;
42
44
45 Result<std::unordered_map<std::string, std::string>> Metadata() final;
46
47 private:
48 class Impl;
49 std::unique_ptr<Impl> impl_;
50};
51
52} // namespace iceberg::avro
Base reader class to read data from different file formats.
Definition file_reader.h:39
A schema for a Table.
Definition schema.h:51
A reader that reads ArrowArray from Avro files.
Definition avro_reader.h:31
Status Open(const ReaderOptions &options) final
Open the reader.
Status Close() final
Close the reader.
Define symbol visibility macros for bundled format integrations.
Avro reader, writer, and metadata APIs.
Definition avro_constants.h:27
std::expected< T, E > Result
Result alias.
Definition result.h:88
STL namespace.
Definition arrow_c_data.h:57
Definition arrow_c_data.h:41
Options for creating a reader.
Definition file_reader.h:92