risingwave_common/array/arrow/
mod.rs

1// Copyright 2023 RisingWave Labs
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// These mods imports arrow_impl.rs to provide FromArrow, ToArrow traits for corresponding arrow versions,
16// and the default From/To implementations.
17
18mod arrow_54;
19mod arrow_56;
20mod arrow_57;
21// These mods import mods above and may override some methods.
22mod arrow_deltalake;
23mod arrow_iceberg;
24mod arrow_udf;
25
26pub use arrow_deltalake::DeltaLakeConvert;
27pub use arrow_iceberg::{
28    ICEBERG_DECIMAL_PRECISION, ICEBERG_DECIMAL_SCALE, IcebergArrowConvert,
29    IcebergCreateTableArrowConvert,
30};
31pub use arrow_udf::UdfArrowConvert;
32pub use reexport::*;
33/// For other RisingWave crates, they can directly use arrow re-exported here, without adding
34/// `arrow` dependencies in their `Cargo.toml`. And they don't need to care about the version.
35mod reexport {
36    pub use super::arrow_56::{
37        FromArrow as Arrow56FromArrow, ToArrow as Arrow56ToArrow, arrow_array as arrow_array_56,
38        arrow_buffer as arrow_buffer_56, arrow_cast as arrow_cast_56,
39        arrow_schema as arrow_schema_56,
40    };
41    pub use super::arrow_57::{
42        FromArrow as Arrow57FromArrow, ToArrow as Arrow57ToArrow, arrow_array as arrow_array_57,
43        arrow_buffer as arrow_buffer_57, arrow_cast as arrow_cast_57,
44        arrow_schema as arrow_schema_57,
45    };
46    pub use super::arrow_deltalake::{
47        FromArrow as DeltaLakeFromArrow, ToArrow as DeltaLakeToArrow,
48        arrow_array as arrow_array_deltalake, arrow_buffer as arrow_buffer_deltalake,
49        arrow_cast as arrow_cast_deltalake, arrow_schema as arrow_schema_deltalake,
50    };
51    pub use super::arrow_iceberg::{
52        FromArrow as IcebergFromArrow, ToArrow as IcebergToArrow,
53        arrow_array as arrow_array_iceberg, arrow_buffer as arrow_buffer_iceberg,
54        arrow_cast as arrow_cast_iceberg, arrow_schema as arrow_schema_iceberg,
55        is_parquet_schema_match_source_schema,
56    };
57    pub use super::arrow_udf::{
58        FromArrow as UdfFromArrow, ToArrow as UdfToArrow, arrow_array as arrow_array_udf,
59        arrow_buffer as arrow_buffer_udf, arrow_cast as arrow_cast_udf,
60        arrow_schema as arrow_schema_udf,
61    };
62}