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//! - [`batch_json_string_to_variant`]: Function to convert a batch of JSON strings to a `VariantArray`.
24//! - [`batch_variant_to_json_string`]: Function to convert a `VariantArray` to a batch of JSON strings.
25//! - [`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
38pub mod cast_to_variant;
39mod from_json;
40mod to_json;
41mod variant_array;
42mod variant_array_builder;
43pub mod variant_get;
44
45pub use variant_array::{ShreddingState, VariantArray};
46pub use variant_array_builder::{VariantArrayBuilder, VariantArrayVariantBuilder};
47
48pub use from_json::batch_json_string_to_variant;
49pub use to_json::batch_variant_to_json_string;