• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 16728097825

04 Aug 2025 04:00PM UTC coverage: 48.355% (-35.1%) from 83.429%
16728097825

Pull #4108

github

web-flow
Merge 1b2d27fd8 into 649ba9576
Pull Request #4108: perf[vortex-array]: use all_valid instead of `invalid_count() == 0`

1 of 1 new or added line in 1 file covered. (100.0%)

11596 existing lines in 378 files now uncovered.

18635 of 38538 relevant lines covered (48.35%)

151786.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

31.25
/vortex-array/src/stream/ext.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use std::future::Future;
5

6
use futures_util::TryStreamExt;
7
use vortex_error::VortexResult;
8

9
use crate::ArrayRef;
10
use crate::arrays::ChunkedArray;
11
use crate::stream::{ArrayStream, SendableArrayStream};
12

13
pub trait ArrayStreamExt: ArrayStream {
14
    /// Box the [`ArrayStream`] so that it can be sent between threads.
15
    fn boxed(self) -> SendableArrayStream
138✔
16
    where
138✔
17
        Self: Sized + Send + 'static,
138✔
18
    {
19
        Box::pin(self)
138✔
20
    }
138✔
21

22
    /// Collect the stream into a single `Array`.
23
    ///
24
    /// If the stream yields multiple chunks, they will be returned as a [`ChunkedArray`].
UNCOV
25
    fn read_all(self) -> impl Future<Output = VortexResult<ArrayRef>>
×
UNCOV
26
    where
×
UNCOV
27
        Self: Sized,
×
28
    {
UNCOV
29
        async move {
×
UNCOV
30
            let dtype = self.dtype().clone();
×
UNCOV
31
            let mut chunks: Vec<ArrayRef> = self.try_collect().await?;
×
UNCOV
32
            if chunks.len() == 1 {
×
UNCOV
33
                Ok(chunks.remove(0))
×
34
            } else {
35
                Ok(ChunkedArray::try_new(chunks, dtype)?.to_array())
×
36
            }
UNCOV
37
        }
×
UNCOV
38
    }
×
39
}
40

41
impl<S: ArrayStream> ArrayStreamExt for S {}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc