Skip to content

Commit

Permalink
unneeded
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Jun 12, 2024
1 parent e116e12 commit 910fc22
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions vortex-array/src/array/null/as_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
use std::sync::Arc;

use arrow_array::{ArrayRef as ArrowArrayRef, NullArray as ArrowNullArray};
use vortex_dtype::DType;
use vortex_error::{vortex_bail, VortexResult};
use vortex_error::VortexResult;

use crate::array::null::NullArray;
use crate::compute::as_arrow::AsArrowArray;
use crate::{ArrayDType, ArrayTrait};
use crate::ArrayTrait;

impl AsArrowArray for NullArray {
fn as_arrow(&self) -> VortexResult<ArrowArrayRef> {
if self.dtype() != &DType::Null {
vortex_bail!(InvalidArgument: "only null ConstantArrays convert to arrow");
}

let arrow_null = ArrowNullArray::new(self.len());
Ok(Arc::new(arrow_null))
}
Expand Down

0 comments on commit 910fc22

Please sign in to comment.