Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Depended on parquet2 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Nov 13, 2021
1 parent 12bcd2a commit 480e023
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ futures = { version = "0.3", optional = true }
# for faster hashing
ahash = { version = "0.7", optional = true }

#parquet2 = { version = "0.6", optional = true, default_features = false, features = ["stream"] }
parquet2 = { git = "https://github.com/jorgecarleitao/parquet2", branch = "struct", optional = true, default_features = false, features = ["stream"] }
#parquet2 = { path = "../parquet2", optional = true, default_features = false, features = ["stream"] }
# parquet support
parquet2 = { version = "0.7", optional = true, default_features = false, features = ["stream"] }

# avro
avro-rs = { version = "0.13", optional = true, default_features = false }

# compression of avro
libflate = { version = "1.1.1", optional = true }

# for division/remainder optimization at runtime
Expand Down
2 changes: 1 addition & 1 deletion src/io/parquet/read/nested_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub fn init_nested(field: &Field, capacity: usize, container: &mut Vec<Box<dyn N
}
match field.data_type().to_logical_type() {
DataType::List(ref inner)
| DataType::List(ref inner)
| DataType::LargeList(ref inner)
| DataType::FixedSizeList(ref inner, _) => {
init_nested(inner.as_ref(), capacity, container)
}
Expand Down
6 changes: 3 additions & 3 deletions src/io/parquet/write/binary/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ pub(crate) fn encode_delta<O: Offset>(
if let Some(validity) = validity {
let lengths = offsets
.windows(2)
.map(|w| (w[1] - w[0]).to_isize() as i32)
.map(|w| (w[1] - w[0]).to_isize() as i64)
.zip(validity.iter())
.flat_map(|(x, is_valid)| if is_valid { Some(x) } else { None });
let length = offsets.len() - 1 - validity.null_count();
let lengths = utils::ExactSizedIter::new(lengths, length);

delta_bitpacked::encode(lengths, buffer);
} else {
let lengths = offsets.windows(2).map(|w| (w[1] - w[0]).to_isize() as i32);
let lengths = offsets.windows(2).map(|w| (w[1] - w[0]).to_isize() as i64);
delta_bitpacked::encode(lengths, buffer);
}
} else {
let lengths = offsets.windows(2).map(|w| (w[1] - w[0]).to_isize() as i32);
let lengths = offsets.windows(2).map(|w| (w[1] - w[0]).to_isize() as i64);
delta_bitpacked::encode(lengths, buffer);
}

Expand Down

0 comments on commit 480e023

Please sign in to comment.