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

vortex-data / vortex / 16505110840

24 Jul 2025 06:40PM UTC coverage: 81.498% (+0.04%) from 81.457%
16505110840

push

github

web-flow
Remove scan async API (#4005)

Signed-off-by: Nicholas Gates <nick@nickgates.com>

150 of 222 new or added lines in 10 files covered. (67.57%)

10 existing lines in 2 files now uncovered.

42586 of 52254 relevant lines covered (81.5%)

172411.37 hits per line

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

93.75
/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
1,380✔
16
    where
1,380✔
17
        Self: Sized + Send + 'static,
1,380✔
18
    {
19
        Box::pin(self)
1,380✔
20
    }
1,380✔
21

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

© 2025 Coveralls, Inc