Skip to content

Commit e90e5c2

Browse files
committed
follow ups
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 19ede4a commit e90e5c2

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

encodings/parquet-variant/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ readme = { workspace = true }
1212
repository = { workspace = true }
1313
rust-version = { workspace = true }
1414
version = { workspace = true }
15-
publish = true
1615

1716
[lints]
1817
workspace = true
@@ -28,10 +27,10 @@ prost = { workspace = true }
2827
vortex-array = { workspace = true }
2928
vortex-buffer = { workspace = true }
3029
vortex-error = { workspace = true }
30+
vortex-json = { workspace = true, optional = true }
3131
vortex-mask = { workspace = true }
3232
vortex-proto = { workspace = true }
3333
vortex-session = { workspace = true }
34-
vortex-json = { workspace = true, optional = true }
3534

3635
[dev-dependencies]
3736
rstest = { workspace = true }

vortex-btrblocks/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ vortex-zstd = { workspace = true, optional = true }
4848

4949
[dev-dependencies]
5050
divan = { workspace = true }
51-
rand = { workspace = true }
5251
rstest = { workspace = true }
5352
test-with = { workspace = true }
5453
vortex-array = { workspace = true, features = ["_test-harness"] }
@@ -66,7 +65,6 @@ parquet-variant = [
6665
"dep:parquet-variant-compute",
6766
"dep:vortex-session",
6867
"dep:vortex-json",
69-
"zstd",
7068
]
7169
pco = ["dep:pco", "dep:vortex-pco"]
7270
zstd = ["dep:vortex-zstd"]

vortex-btrblocks/src/schemes/variant/json_to_variant.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ mod parquet_variant_children {
3636
pub const METADATA: usize = 0;
3737
/// The raw Parquet Variant value child.
3838
pub const VALUE: usize = 1;
39+
/// The raw Parquet Variant typed_value child.
40+
pub const TYPED_VALUE: usize = 2;
3941
}
4042

4143
impl Scheme for JsonToVariantScheme {
4244
fn scheme_name(&self) -> &'static str {
43-
"json_to_variant"
45+
"vortex.variant.pq.json"
4446
}
4547

4648
fn matches(&self, canonical: &Canonical) -> bool {
@@ -109,14 +111,29 @@ impl Scheme for JsonToVariantScheme {
109111
})
110112
.transpose()?;
111113

114+
// This is currently always none, but we should make sure to compress it
115+
// if it exists
116+
let typed_value = parquet_variant
117+
.typed_value_array()
118+
.map(|typed| {
119+
compressor.compress_child(
120+
typed,
121+
&compress_ctx,
122+
self.id(),
123+
parquet_variant_children::TYPED_VALUE,
124+
exec_ctx,
125+
)
126+
})
127+
.transpose()?;
128+
112129
let variant_validity = parquet_variant
113130
.validity()?
114131
.union_nullability(output_nullability);
115132
let variant = ParquetVariant::try_new(
116133
variant_validity,
117134
compressed_metadata,
118135
compressed_value,
119-
parquet_variant.typed_value_array().cloned(),
136+
typed_value,
120137
)?
121138
.into_array();
122139

vortex-btrblocks/src/schemes/variant/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ fn prefers_smaller_extension_storage_over_variant_scheme() -> vortex_error::Vort
302302
&JsonToVariantScheme,
303303
&BinaryDictScheme,
304304
&BinaryFSSTScheme,
305-
&binary::ZstdScheme,
306305
&IntConstantScheme,
307306
&StringConstantScheme,
308307
&FoRScheme,

0 commit comments

Comments
 (0)