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