Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Jun 6, 2024
1 parent 89ec624 commit cc1f3de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
1 change: 0 additions & 1 deletion bench-vortex/src/public_bi_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ impl BenchmarkDataset for BenchmarkDatasets {
self.as_uncompressed();
for f in self.list_files(FileType::Csv) {
info!("Compressing {} to lance", f.to_str().unwrap());
println!("Compressing {} to lance", f.to_str().unwrap());
let output_fname = f
.file_name()
.unwrap()
Expand Down
27 changes: 4 additions & 23 deletions vortex-alp/src/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,10 @@ mod test {

let flat = alp.as_contiguous(&[encoded]).unwrap();

let a = scalar_at(&flat, 0)
.unwrap()
.value()
.as_pvalue()
.unwrap()
.unwrap();
let a: f64 = a.try_into().unwrap();

let b = scalar_at(&flat, 1)
.unwrap()
.value()
.as_pvalue()
.unwrap()
.unwrap();
let b: f64 = b.try_into().unwrap();

let c = scalar_at(&flat, 2)
.unwrap()
.value()
.as_pvalue()
.unwrap()
.unwrap();
let c: f64 = c.try_into().unwrap();
let a: f64 = scalar_at(&flat, 0).unwrap().try_into().unwrap();
let b: f64 = scalar_at(&flat, 1).unwrap().try_into().unwrap();

let c: f64 = scalar_at(&flat, 2).unwrap().try_into().unwrap();

assert_eq!(a, 1.0);
assert_eq!(b, 2.0);
Expand Down
2 changes: 1 addition & 1 deletion vortex-array/src/compute/as_contiguous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ macro_rules! impl_default_as_contiguous_fn {
vortex_error::vortex_bail!(ComputeError: "mismatched dtypes in call to as_contiguous");
}

let mut chunks = Vec::with_capacity(arrays.iter().map(|array| array.len()).sum());
let mut chunks = Vec::with_capacity(arrays.len());
for array in arrays {
chunks.push(array.clone().flatten()?.into_array());
}
Expand Down

0 comments on commit cc1f3de

Please sign in to comment.