diff --git a/vortex-layout/src/layouts/chunked/reader.rs b/vortex-layout/src/layouts/chunked/reader.rs index 34816d5bdf8..6a0c63b6eb5 100644 --- a/vortex-layout/src/layouts/chunked/reader.rs +++ b/vortex-layout/src/layouts/chunked/reader.rs @@ -2,6 +2,7 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use std::collections::BTreeSet; +use std::future; use std::ops::Range; use std::sync::Arc; @@ -11,6 +12,7 @@ use futures::future::BoxFuture; use futures::stream::FuturesOrdered; use itertools::Itertools; use vortex_array::ArrayRef; +use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::MaskFuture; use vortex_array::arrays::ChunkedArray; @@ -293,9 +295,7 @@ impl LayoutReader for ChunkedReader { ) -> VortexResult>> { let dtype = expr.return_dtype(self.dtype())?; if row_range.is_empty() { - return Ok( - async move { Ok(ChunkedArray::try_new(vec![], dtype)?.into_array()) }.boxed(), - ); + return Ok(future::ready(Ok(Canonical::empty(&dtype).into_array())).boxed()); } let mut chunk_evals = vec![];