Skip to content

Commit

Permalink
Fix remaining copies (#504)
Browse files Browse the repository at this point in the history
Arrow-rs actually removed the quiet copy impls upstream in
apache/arrow-rs#6043

Since they made it a breaking change, removing the copies was as simple
as finding and fixing the compile failures, which it looks like were
only remaining in VarBinView
  • Loading branch information
a10y authored Jul 23, 2024
1 parent a246864 commit b6ac194
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vortex-array/src/array/varbinview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{mem, slice};

use ::serde::{Deserialize, Serialize};
use arrow_array::{ArrayRef, BinaryViewArray, StringViewArray};
use arrow_buffer::{Buffer, ScalarBuffer};
use arrow_buffer::ScalarBuffer;
use arrow_schema::DataType;
use itertools::Itertools;
use vortex_dtype::{DType, Nullability, PType};
Expand Down Expand Up @@ -271,18 +271,18 @@ fn as_arrow(var_bin_view: VarBinViewArray) -> ArrayRef {

let data = data
.iter()
.map(|p| Buffer::from(p.buffer()))
.map(|p| p.buffer().clone().into_arrow())
.collect::<Vec<_>>();

// Switch on Arrow DType.
match var_bin_view.dtype() {
DType::Binary(_) => Arc::new(BinaryViewArray::new(
ScalarBuffer::<u128>::from(Buffer::from(views.buffer())),
ScalarBuffer::<u128>::from(views.buffer().clone().into_arrow()),
data,
nulls,
)),
DType::Utf8(_) => Arc::new(StringViewArray::new(
ScalarBuffer::<u128>::from(Buffer::from(views.buffer())),
ScalarBuffer::<u128>::from(views.buffer().clone().into_arrow()),
data,
nulls,
)),
Expand Down

0 comments on commit b6ac194

Please sign in to comment.