Skip to content
Open
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
10 changes: 6 additions & 4 deletions parquet-variant-compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ keywords = ["arrow", "parquet", "variant"]
edition = { workspace = true }
rust-version = { workspace = true }


[dependencies]
arrow = { workspace = true , features = ["canonical_extension_types"]}
arrow = { workspace = true, features = ["canonical_extension_types"] }
arrow-schema = { workspace = true }
half = { version = "2.1", default-features = false }
indexmap = "2.10.0"
parquet-variant = { workspace = true }
parquet-variant-json = { workspace = true }
chrono = { workspace = true }
uuid = { version = "1.18.0", features = ["v4"]}
uuid = { version = "1.18.0", features = ["v4"] }
serde_json = "1.0"

# uuid requires the `js` feature to run on wasm
[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.18.0", features = ["v4", "js"] }

[lib]
name = "parquet_variant_compute"
bench = false
Expand All @@ -48,7 +51,6 @@ rand = "0.9.1"
criterion = { workspace = true, default-features = false }
arrow = { workspace = true, features = ["test_utils"] }


[[bench]]
name = "variant_kernels"
harness = false
4 changes: 3 additions & 1 deletion parquet-variant-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ readme = "../parquet-variant/README.md"
edition = { workspace = true }
rust-version = { workspace = true }


[dependencies]
arrow-schema = { workspace = true }
parquet-variant = { workspace = true }
Expand All @@ -37,6 +36,9 @@ serde_json = "1.0"
base64 = "0.22"
uuid = "1.18.0"

# uuid requires the `js` feature to run on wasm
[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.18.0", features = ["js"] }

[lib]
name = "parquet_variant_json"
Expand Down
9 changes: 6 additions & 3 deletions parquet-variant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ edition = { workspace = true }
rust-version = { workspace = true }

[dependencies]
arrow = { workspace = true , features = ["canonical_extension_types"] }
arrow = { workspace = true, features = ["canonical_extension_types"] }
arrow-schema = { workspace = true }
chrono = { workspace = true }
half = { version = "2.1", default-features = false }
indexmap = "2.10.0"
num-traits = { version = "0.2", default-features = false }
uuid = { version = "1.18.0", features = ["v4"]}
uuid = { version = "1.18.0", features = ["v4"] }
simdutf8 = { workspace = true, optional = true }

simdutf8 = { workspace = true , optional = true }
# uuid requires the `js` feature to run on wasm
[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.18.0", features = ["v4", "js"] }

[lib]
name = "parquet_variant"
Expand Down
3 changes: 3 additions & 0 deletions parquet-variant/src/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ pub enum Variant<'m, 'v> {
}

// We don't want this to grow because it could hurt performance of a frequently-created type.
#[cfg(target_pointer_width = "64")]
const _: () = crate::utils::expect_size_of::<Variant>(80);
#[cfg(target_pointer_width = "32")]
const _: () = crate::utils::expect_size_of::<Variant>(48);

enum NumericKind {
Integer,
Expand Down
4 changes: 4 additions & 0 deletions parquet-variant/src/variant/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ pub struct VariantList<'m, 'v> {
}

// We don't want this to grow because it could increase the size of `Variant` and hurt performance.
#[cfg(target_pointer_width = "64")]
const _: () = crate::utils::expect_size_of::<VariantList>(64);

#[cfg(target_pointer_width = "32")]
const _: () = crate::utils::expect_size_of::<VariantList>(40);

impl<'m, 'v> VariantList<'m, 'v> {
/// Attempts to interpret `value` as a variant array value.
///
Expand Down
4 changes: 4 additions & 0 deletions parquet-variant/src/variant/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ pub struct VariantMetadata<'m> {

// We don't want this to grow because it increases the size of VariantList and VariantObject, which
// could increase the size of Variant. All those size increases could hurt performance.
#[cfg(target_pointer_width = "64")]
const _: () = crate::utils::expect_size_of::<VariantMetadata>(32);

#[cfg(target_pointer_width = "32")]
const _: () = crate::utils::expect_size_of::<VariantMetadata>(20);

/// The canonical byte slice corresponding to an empty metadata dictionary.
///
/// ```
Expand Down
4 changes: 4 additions & 0 deletions parquet-variant/src/variant/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@ pub struct VariantObject<'m, 'v> {
}

// We don't want this to grow because it could increase the size of `Variant` and hurt performance.
#[cfg(target_pointer_width = "64")]
const _: () = crate::utils::expect_size_of::<VariantObject>(64);

#[cfg(target_pointer_width = "32")]
const _: () = crate::utils::expect_size_of::<VariantObject>(44);

impl<'m, 'v> VariantObject<'m, 'v> {
pub fn new(metadata: VariantMetadata<'m>, value: &'v [u8]) -> Self {
Self::try_new_with_shallow_validation(metadata, value).expect("Invalid variant object")
Expand Down
Loading