risingwave_common/array/arrow/
mod.rs

1// Copyright 2025 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_55;
20// These mods import mods above and may override some methods.
21mod arrow_deltalake;
22mod arrow_iceberg;
23mod arrow_udf;
24
25pub use arrow_deltalake::DeltaLakeConvert;
26pub use arrow_iceberg::{
27    ICEBERG_DECIMAL_PRECISION, ICEBERG_DECIMAL_SCALE, IcebergArrowConvert,
28    IcebergCreateTableArrowConvert,
29};
30pub use arrow_udf::UdfArrowConvert;
31pub use reexport::*;
32/// For other RisingWave crates, they can directly use arrow re-exported here, without adding
33/// `arrow` dependencies in their `Cargo.toml`. And they don't need to care about the version.
34mod reexport {
35    pub use super::arrow_deltalake::{
36        FromArrow as DeltaLakeFromArrow, ToArrow as DeltaLakeToArrow,
37        arrow_array as arrow_array_deltalake, arrow_buffer as arrow_buffer_deltalake,
38        arrow_cast as arrow_cast_deltalake, arrow_schema as arrow_schema_deltalake,
39    };
40    pub use super::arrow_iceberg::{
41        FromArrow as IcebergFromArrow, ToArrow as IcebergToArrow,
42        arrow_array as arrow_array_iceberg, arrow_buffer as arrow_buffer_iceberg,
43        arrow_cast as arrow_cast_iceberg, arrow_schema as arrow_schema_iceberg,
44        is_parquet_schema_match_source_schema,
45    };
46    pub use super::arrow_udf::{
47        FromArrow as UdfFromArrow, ToArrow as UdfToArrow, arrow_array as arrow_array_udf,
48        arrow_buffer as arrow_buffer_udf, arrow_cast as arrow_cast_udf,
49        arrow_schema as arrow_schema_udf,
50    };
51}