Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arrow=54 + Bump version #254

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
276 changes: 131 additions & 145 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 0.12.3

- Add `arrow=54` support

## 0.12.2

Bug fixes:
Expand Down
4 changes: 2 additions & 2 deletions example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2018"

[dependencies]
# arrow-version:replace: arrow = {{ version = "{version}", features = ["ipc"] }}
arrow = {version = "53.0", features = ["ipc"] }
arrow = { version = "54", features = ["ipc"] }

chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }

# arrow-version:replace: serde_arrow = {{ path = "../serde_arrow", features = ["arrow-{version}"] }}
serde_arrow = { path = "../serde_arrow", features = ["arrow-53"] }
serde_arrow = { path = "../serde_arrow", features = ["arrow-54"] }
4 changes: 2 additions & 2 deletions integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ edition = "2021"

[dependencies]
# arrow-version:replace: arrow = {{ version = "{version}", features = ["ipc"] }}
arrow = {version = "53.0", features = ["ipc"] }
arrow = { version = "54", features = ["ipc"] }

chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"

# arrow-version:replace: serde_arrow = {{ path = "../serde_arrow", features = ["arrow-{version}"] }}
serde_arrow = { path = "../serde_arrow", features = ["arrow-53"] }
serde_arrow = { path = "../serde_arrow", features = ["arrow-54"] }
17 changes: 12 additions & 5 deletions serde_arrow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_arrow"
version = "0.12.2"
version = "0.12.3"
authors = ["Christopher Prohm <[email protected]>"]
edition = "2021"
description = "Convert sequences of Rust objects to Arrow arrays and back again"
Expand All @@ -15,17 +15,18 @@ bench = false
[[bench]]
name = "serde_arrow_bench"
# arrow-version:replace: required-features = ["arrow2-0-17", "arrow-{version}"]
required-features = ["arrow2-0-17", "arrow-53"]
required-features = ["arrow2-0-17", "arrow-54"]
harness = false

[package.metadata.docs.rs]
# arrow-version:replace: features = ["arrow2-0-17", "arrow-{version}"]
features = ["arrow2-0-17", "arrow-53"]
features = ["arrow2-0-17", "arrow-54"]

[features]
default = []

# arrow-version:insert: arrow-{version} = ["dep:arrow-array-{version}", "dep:arrow-schema-{version}", "dep:arrow-data-{version}", "dep:arrow-buffer-{version}"]
arrow-54 = ["dep:arrow-array-54", "dep:arrow-schema-54", "dep:arrow-data-54", "dep:arrow-buffer-54"]
arrow-53 = ["dep:arrow-array-53", "dep:arrow-schema-53", "dep:arrow-data-53", "dep:arrow-buffer-53"]
arrow-52 = ["dep:arrow-array-52", "dep:arrow-schema-52", "dep:arrow-data-52", "dep:arrow-buffer-52"]
arrow-51 = ["dep:arrow-array-51", "dep:arrow-schema-51", "dep:arrow-data-51", "dep:arrow-buffer-51"]
Expand All @@ -52,6 +53,7 @@ half = { version = "2", features = ["bytemuck"], default-features = false }
serde = { version = "1.0", features = ["derive", "std"], default-features = false }

# arrow-version:insert: arrow-array-{version} = {{ package = "arrow-array", version = "{version}", optional = true, default-features = false }}
arrow-array-54 = { package = "arrow-array", version = "54", optional = true, default-features = false }
arrow-array-53 = { package = "arrow-array", version = "53", optional = true, default-features = false }
arrow-array-52 = { package = "arrow-array", version = "52", optional = true, default-features = false }
arrow-array-51 = { package = "arrow-array", version = "51", optional = true, default-features = false }
Expand All @@ -71,6 +73,7 @@ arrow-array-38 = { package = "arrow-array", version = "38", optional = true, def
arrow-array-37 = { package = "arrow-array", version = "37", optional = true, default-features = false }

# arrow-version:insert: arrow-buffer-{version} = {{ package = "arrow-buffer", version = "{version}", optional = true, default-features = false }}
arrow-buffer-54 = { package = "arrow-buffer", version = "54", optional = true, default-features = false }
arrow-buffer-53 = { package = "arrow-buffer", version = "53", optional = true, default-features = false }
arrow-buffer-52 = { package = "arrow-buffer", version = "52", optional = true, default-features = false }
arrow-buffer-51 = { package = "arrow-buffer", version = "51", optional = true, default-features = false }
Expand All @@ -90,6 +93,7 @@ arrow-buffer-38 = { package = "arrow-buffer", version = "38", optional = true, d
arrow-buffer-37 = { package = "arrow-buffer", version = "37", optional = true, default-features = false }

# arrow-version:insert: arrow-data-{version} = {{ package = "arrow-data", version="{version}", optional = true, default-features = false }}
arrow-data-54 = { package = "arrow-data", version="54", optional = true, default-features = false }
arrow-data-53 = { package = "arrow-data", version="53", optional = true, default-features = false }
arrow-data-52 = { package = "arrow-data", version="52", optional = true, default-features = false }
arrow-data-51 = { package = "arrow-data", version="51", optional = true, default-features = false }
Expand All @@ -109,6 +113,7 @@ arrow-data-38 = { package = "arrow-data", version="38", optional = true, default
arrow-data-37 = { package = "arrow-data", version="37", optional = true, default-features = false }

# arrow-version:insert: arrow-schema-{version} = {{ package = "arrow-schema", version = "{version}", optional = true, default-features = false }}
arrow-schema-54 = { package = "arrow-schema", version = "54", optional = true, default-features = false }
arrow-schema-53 = { package = "arrow-schema", version = "53", optional = true, default-features = false }
arrow-schema-52 = { package = "arrow-schema", version = "52", optional = true, default-features = false }
arrow-schema-51 = { package = "arrow-schema", version = "51", optional = true, default-features = false }
Expand Down Expand Up @@ -143,13 +148,14 @@ jiff = { version = "0.1", features = ["serde"] }

# for benchmarks
# arrow-version:replace: arrow-json-{version} = {{ package = "arrow-json", version = "{version}" }}
arrow-json-53 = { package = "arrow-json", version = "53" }
arrow-json-54 = { package = "arrow-json", version = "54" }
criterion = "0.5"
arrow2_convert = "0.5.0"
serde-transcode = "1"
simd-json = "0.13.8"

# arrow-version:insert: arrow-schema-{version} = {{ package = "arrow-schema", version = "{version}", default-features = false, features = ["serde"] }}
arrow-schema-54 = { package = "arrow-schema", version = "54", default-features = false, features = ["serde"] }
arrow-schema-53 = { package = "arrow-schema", version = "53", default-features = false, features = ["serde"] }
arrow-schema-52 = { package = "arrow-schema", version = "52", default-features = false, features = ["serde"] }
arrow-schema-51 = { package = "arrow-schema", version = "51", default-features = false, features = ["serde"] }
Expand Down Expand Up @@ -186,6 +192,7 @@ check-cfg = [
'cfg(has_arrow)',
'cfg(has_arrow_fixed_binary_support)',
# arrow-version:insert: 'cfg(has_arrow_{version})',
'cfg(has_arrow_54)',
'cfg(has_arrow_53)',
'cfg(has_arrow_52)',
'cfg(has_arrow_51)',
Expand All @@ -203,4 +210,4 @@ check-cfg = [
'cfg(has_arrow_39)',
'cfg(has_arrow_38)',
'cfg(has_arrow_37)',
]
]
4 changes: 2 additions & 2 deletions serde_arrow/benches/groups/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ pub mod arrow {
use std::sync::Arc;

// arrow-version:replace: use arrow_json_{version}::ReaderBuilder;
use arrow_json_53::ReaderBuilder;
use arrow_json_54::ReaderBuilder;
// arrow-version:replace: use arrow_schema_{version}::Schema;
use arrow_schema_53::Schema;
use arrow_schema_54::Schema;

use serde::Serialize;

Expand Down
6 changes: 3 additions & 3 deletions serde_arrow/benches/groups/json_to_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use {
};

// arrow-version:replace: use arrow_json_{version}::ReaderBuilder;
use arrow_json_53::ReaderBuilder;
use arrow_json_54::ReaderBuilder;

// arrow-version:replace: use arrow_schema_{version}::{{FieldRef, Schema as ArrowSchema}};
use arrow_schema_53::{FieldRef, Schema as ArrowSchema};
use arrow_schema_54::{FieldRef, Schema as ArrowSchema};

// arrow-version:replace: use arrow_array_{version}::RecordBatch;
use arrow_array_53::RecordBatch;
use arrow_array_54::RecordBatch;
use serde_json::Value;

fn benchmark_json_to_arrow(c: &mut criterion::Criterion) {
Expand Down
2 changes: 2 additions & 0 deletions serde_arrow/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fn main() {

let max_arrow_version: Option<usize> = [
// arrow-version:insert: #[cfg(feature = "arrow-{version}")]{\n}{version},
#[cfg(feature = "arrow-54")]
54,
#[cfg(feature = "arrow-53")]
53,
#[cfg(feature = "arrow-52")]
Expand Down
2 changes: 2 additions & 0 deletions serde_arrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
//! | Arrow Feature | Arrow Version |
//! |---------------|---------------|
// arrow-version:insert: //! | `arrow-{version}` | `arrow={version}` |
//! | `arrow-54` | `arrow=54` |
//! | `arrow-53` | `arrow=53` |
//! | `arrow-52` | `arrow=52` |
//! | `arrow-51` | `arrow=51` |
Expand Down Expand Up @@ -269,6 +270,7 @@ pub mod _impl {
}

// arrow-version:insert: #[cfg(has_arrow_{version})] build_arrow_crate!(arrow_array_{version}, arrow_buffer_{version}, arrow_data_{version}, arrow_schema_{version});
#[cfg(has_arrow_54)] build_arrow_crate!(arrow_array_54, arrow_buffer_54, arrow_data_54, arrow_schema_54);
#[cfg(has_arrow_53)] build_arrow_crate!(arrow_array_53, arrow_buffer_53, arrow_data_53, arrow_schema_53);
#[cfg(has_arrow_52)] build_arrow_crate!(arrow_array_52, arrow_buffer_52, arrow_data_52, arrow_schema_52);
#[cfg(has_arrow_51)] build_arrow_crate!(arrow_array_51, arrow_buffer_51, arrow_data_51, arrow_schema_51);
Expand Down
1 change: 1 addition & 0 deletions x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

all_arrow_features = [
# arrow-version:insert: "arrow-{version}",
"arrow-54",
"arrow-53",
"arrow-52",
"arrow-51",
Expand Down
Loading