Skip to content

Commit e010b95

Browse files
authored
feat! add back arrow-55 support (delta-io#1458)
## What changes are proposed in this pull request? Put back support for arrow-55 for now ## How was this change tested? CI / unit tests
1 parent 6a5aa8e commit e010b95

File tree

4 files changed

+36
-7
lines changed

4 files changed

+36
-7
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ consumer's own `Engine` trait, the kernel has a feature flag to enable a default
5454
# allows consumers to implement their own in-memory format
5555
delta_kernel = "0.16.0"
5656

57-
# or turn on the default engine, based on arrow
58-
delta_kernel = { version = "0.16.0", features = ["default-engine", "arrow-56"] }
57+
# or turn on the default engine, based on latest arrow
58+
delta_kernel = { version = "0.16.0", features = ["default-engine", "arrow"] }
5959
```
6060

6161
### Feature flags
@@ -85,6 +85,7 @@ arrow versions as we can.
8585
We allow selecting the version of arrow to use via feature flags. Currently we support the following
8686
flags:
8787

88+
- `arrow-55`: Use arrow version 55
8889
- `arrow-56`: Use arrow version 56
8990
- `arrow-57`: Use arrow version 57
9091
- `arrow`: Use the latest arrow version. Note that this is an _unstable_ flag: we will bump this to
@@ -170,4 +171,4 @@ Some design principles which should be considered:
170171
[cargo-llvm-cov]: https://github.com/taiki-e/cargo-llvm-cov
171172
[FFI]: ffi/
172173
[Arrow]: https://arrow.apache.org/rust/arrow/index.html
173-
[Tokio]: https://tokio.rs/
174+
[Tokio]: https://tokio.rs/

kernel/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ object_store = { version = "0.12.3", optional = true, features = ["aws", "azure"
6767
# TODO: Remove this once https://github.com/apache/arrow-rs/pull/8244 ships
6868
comfy-table = { version = "~7.1", optional = true }
6969

70+
# arrow 55
71+
[dependencies.arrow_55]
72+
package = "arrow"
73+
version = "55"
74+
features = ["chrono-tz", "ffi", "json", "prettyprint"]
75+
optional = true
76+
[dependencies.parquet_55]
77+
package = "parquet"
78+
version = "55"
79+
features = ["async", "object_store"]
80+
optional = true
81+
7082
# arrow 56
7183
[dependencies.arrow_56]
7284
package = "arrow"
@@ -103,6 +115,7 @@ integration-test = ["hdfs-native-object-store/integration-test"]
103115
arrow = ["arrow-57"] # latest arrow version
104116
need-arrow = [] # need-arrow is a marker that the feature needs arrow dep
105117

118+
arrow-55 = ["dep:arrow_55", "dep:parquet_55", "object_store", "comfy-table"]
106119
arrow-56 = ["dep:arrow_56", "dep:parquet_56", "object_store", "comfy-table"]
107120
arrow-57 = ["dep:arrow_57", "dep:parquet_57", "object_store", "comfy-table"]
108121
arrow-conversion = ["need-arrow"]

kernel/src/arrow_compat.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,35 @@ mod arrow_compat_shims {
66
pub use parquet_57 as parquet;
77
}
88

9-
#[cfg(all(feature = "arrow-56", not(feature = "arrow-57")))]
9+
#[cfg(all(
10+
feature = "arrow-56",
11+
not(feature = "arrow-57"),
12+
not(feature = "arrow-55")
13+
))]
1014
mod arrow_compat_shims {
1115
pub use arrow_56 as arrow;
1216
pub use parquet_56 as parquet;
1317
}
1418

19+
#[cfg(all(
20+
feature = "arrow-55",
21+
not(feature = "arrow-57"),
22+
not(feature = "arrow-56")
23+
))]
24+
mod arrow_compat_shims {
25+
pub use arrow_55 as arrow;
26+
pub use parquet_55 as parquet;
27+
}
28+
1529
// if nothing is enabled but we need arrow because of some other feature flag, throw compile-time
1630
// error
1731
#[cfg(all(
1832
feature = "need-arrow",
33+
not(feature = "arrow-55"),
1934
not(feature = "arrow-56"),
2035
not(feature = "arrow-57")
2136
))]
22-
compile_error!("Requested a feature that needs arrow without enabling arrow. Please enable the `arrow-56` or `arrow-57` feature");
37+
compile_error!("Requested a feature that needs arrow without enabling arrow. Please enable the `arrow-55`, `arrow-56`, or `arrow-57` feature");
2338

24-
#[cfg(any(feature = "arrow-56", feature = "arrow-57"))]
39+
#[cfg(any(feature = "arrow-55", feature = "arrow-56", feature = "arrow-57"))]
2540
pub use arrow_compat_shims::*;

kernel/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub use log_path::LogPath;
108108
mod row_tracking;
109109

110110
mod arrow_compat;
111-
#[cfg(any(feature = "arrow-56", feature = "arrow-57"))]
111+
#[cfg(any(feature = "arrow-55", feature = "arrow-56", feature = "arrow-57"))]
112112
pub use arrow_compat::*;
113113

114114
pub mod kernel_predicates;

0 commit comments

Comments
 (0)