parquet_variant_compute/
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//! [`VariantArray`] and compute kernels for the [Variant Binary Encoding] from [Apache Parquet].
19//!
20//! ## Main APIs
21//! - [`VariantArray`] : Represents an array of `Variant` values.
22//! - [`VariantArrayBuilder`]: For building [`VariantArray`]
23//! - [`json_to_variant`]: Function to convert a batch of JSON strings to a `VariantArray`.
24//! - [`variant_to_json`]: Function to convert a `VariantArray` to a batch of JSON strings.
25//! - [`mod@cast_to_variant`]: Module to cast other Arrow arrays to `VariantArray`.
26//! - [`variant_get`]: Module to get values from a `VariantArray` using a specified [`VariantPath`]
27//!
28//! ## 🚧 Work In Progress
29//!
30//! This crate is under active development and is not yet ready for production use.
31//! If you are interested in helping, you can find more information on the GitHub [Variant issue]
32//!
33//! [Variant Binary Encoding]: https://github.com/apache/parquet-format/blob/master/VariantEncoding.md
34//! [Apache Parquet]: https://parquet.apache.org/
35//! [`VariantPath`]: parquet_variant::VariantPath
36//! [Variant issue]: https://github.com/apache/arrow-rs/issues/6736
37
38mod arrow_to_variant;
39pub mod cast_to_variant;
40mod from_json;
41mod shred_variant;
42mod to_json;
43mod type_conversion;
44mod unshred_variant;
45mod variant_array;
46mod variant_array_builder;
47pub mod variant_get;
48mod variant_to_arrow;
49
50pub use variant_array::{BorrowedShreddingState, ShreddingState, VariantArray, VariantType};
51pub use variant_array_builder::{VariantArrayBuilder, VariantValueArrayBuilder};
52
53pub use cast_to_variant::{cast_to_variant, cast_to_variant_with_options};
54pub use from_json::json_to_variant;
55pub use shred_variant::shred_variant;
56pub use to_json::variant_to_json;
57pub use type_conversion::CastOptions;
58pub use unshred_variant::unshred_variant;