Skip to content

Commit

Permalink
support string_view and binary_view
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil committed Mar 11, 2024
1 parent 51bcadb commit a6410ce
Show file tree
Hide file tree
Showing 16 changed files with 1,128 additions and 110 deletions.
6 changes: 3 additions & 3 deletions arrow-array/src/array/byte_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub struct GenericByteArray<T: ByteArrayType> {
impl<T: ByteArrayType> Clone for GenericByteArray<T> {
fn clone(&self) -> Self {
Self {
data_type: self.data_type.clone(),
data_type: T::DATA_TYPE,
value_offsets: self.value_offsets.clone(),
value_data: self.value_data.clone(),
nulls: self.nulls.clone(),
Expand Down Expand Up @@ -323,7 +323,7 @@ impl<T: ByteArrayType> GenericByteArray<T> {
/// Returns a zero-copy slice of this array with the indicated offset and length.
pub fn slice(&self, offset: usize, length: usize) -> Self {
Self {
data_type: self.data_type.clone(),
data_type: T::DATA_TYPE,
value_offsets: self.value_offsets.slice(offset, length),
value_data: self.value_data.clone(),
nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)),
Expand Down Expand Up @@ -511,7 +511,7 @@ impl<T: ByteArrayType> From<ArrayData> for GenericByteArray<T> {
Self {
value_offsets,
value_data,
data_type: data.data_type().clone(),
data_type: T::DATA_TYPE,
nulls: data.nulls().cloned(),
}
}
Expand Down
Loading

0 comments on commit a6410ce

Please sign in to comment.