Skip to content

Commit

Permalink
removes redundant methods
Browse files Browse the repository at this point in the history
  • Loading branch information
heyrutvik committed Jul 2, 2022
1 parent d2d2f58 commit f3e0768
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion arrow/src/array/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub trait Array: fmt::Debug + Send + Sync + JsonEqual {
/// Returns a reference to the underlying data of this array.
fn data(&self) -> &ArrayData;

/// Returns underlying data of this array.
/// Returns the underlying data of this array.
fn into_data(self) -> ArrayData;

/// Returns a reference-counted pointer to the underlying data of this array.
Expand Down
5 changes: 0 additions & 5 deletions arrow/src/array/array_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> {
) -> impl Iterator<Item = Option<T::Native>> + 'a {
indexes.map(|opt_index| opt_index.map(|index| self.value_unchecked(index)))
}

/// Returns the backing [`ArrayData`] of this [`PrimitiveArray`]
pub fn into_data(self) -> ArrayData {
self.into()
}
}

impl<T: ArrowPrimitiveType> From<PrimitiveArray<T>> for ArrayData {
Expand Down
5 changes: 0 additions & 5 deletions arrow/src/array/array_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ impl<OffsetSize: OffsetSizeTrait> GenericStringArray<OffsetSize> {
) -> impl Iterator<Item = Option<&str>> + 'a {
indexes.map(|opt_index| opt_index.map(|index| self.value_unchecked(index)))
}

/// Returns the backing [`ArrayData`] of this [`GenericStringArray`]
pub fn into_data(self) -> ArrayData {
self.into()
}
}

impl<'a, Ptr, OffsetSize: OffsetSizeTrait> FromIterator<&'a Option<Ptr>>
Expand Down
2 changes: 1 addition & 1 deletion arrow/src/array/builder/primitive_dictionary_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::any::Any;
use std::collections::HashMap;
use std::sync::Arc;

use crate::array::{ArrayRef, ArrowPrimitiveType, DictionaryArray};
use crate::array::{Array, ArrayRef, ArrowPrimitiveType, DictionaryArray};
use crate::datatypes::{ArrowNativeType, DataType, ToByteSlice};
use crate::error::{ArrowError, Result};

Expand Down

0 comments on commit f3e0768

Please sign in to comment.