arrow_avro/lib.rs
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//! Convert data to / from the [Apache Arrow] memory format and [Apache Avro]
19//!
20//! [Apache Arrow]: https://arrow.apache.org
21//! [Apache Avro]: https://avro.apache.org/
22
23#![doc(
24 html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
25 html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
26)]
27#![cfg_attr(docsrs, feature(doc_auto_cfg))]
28#![warn(missing_docs)]
29#![allow(unused)] // Temporary
30
31/// Core functionality for reading Avro data into Arrow arrays
32///
33/// Implements the primary reader interface and record decoding logic.
34pub mod reader;
35
36/// Avro schema parsing and representation
37///
38/// Provides types for parsing and representing Avro schema definitions.
39mod schema;
40
41/// Compression codec implementations for Avro
42///
43/// Provides support for various compression algorithms used in Avro files,
44/// including Deflate, Snappy, and ZStandard.
45mod compression;
46
47/// Data type conversions between Avro and Arrow types
48///
49/// This module contains the necessary types and functions to convert between
50/// Avro data types and Arrow data types.
51mod codec;
52
53#[cfg(test)]
54mod test_util {
55 pub fn arrow_test_data(path: &str) -> String {
56 match std::env::var("ARROW_TEST_DATA") {
57 Ok(dir) => format!("{dir}/{path}"),
58 Err(_) => format!("../testing/data/{path}"),
59 }
60 }
61}