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

vortex-data / vortex / 16578751259

28 Jul 2025 07:46PM UTC coverage: 81.858% (+0.8%) from 81.087%
16578751259

Pull #3992

github

web-flow
Merge 0fe171459 into 1ae560509
Pull Request #3992: feat: teach SparseArray to canonicalize lists

222 of 241 new or added lines in 1 file covered. (92.12%)

495 existing lines in 40 files now uncovered.

43529 of 53176 relevant lines covered (81.86%)

169875.89 hits per line

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

0.0
/vortex-array/src/arrow/iter.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use arrow_array::ffi_stream;
5
use vortex_dtype::DType;
6
use vortex_dtype::arrow::FromArrowType;
7
use vortex_error::{VortexError, VortexResult};
8

9
use crate::ArrayRef;
10
use crate::arrow::FromArrowArray;
11
use crate::iter::ArrayIterator;
12

13
/// An adapter for converting an `ArrowArrayStreamReader` into a Vortex `ArrayStream`.
14
pub struct ArrowArrayStreamAdapter {
15
    stream: ffi_stream::ArrowArrayStreamReader,
16
    dtype: DType,
17
}
18

19
impl ArrowArrayStreamAdapter {
UNCOV
20
    pub fn new(stream: ffi_stream::ArrowArrayStreamReader, dtype: DType) -> Self {
×
UNCOV
21
        Self { stream, dtype }
×
UNCOV
22
    }
×
23
}
24

25
impl ArrayIterator for ArrowArrayStreamAdapter {
26
    fn dtype(&self) -> &DType {
×
27
        &self.dtype
×
UNCOV
28
    }
×
29
}
30

31
impl Iterator for ArrowArrayStreamAdapter {
32
    type Item = VortexResult<ArrayRef>;
33

UNCOV
34
    fn next(&mut self) -> Option<Self::Item> {
×
UNCOV
35
        let batch = self.stream.next()?;
×
36

UNCOV
37
        Some(batch.map_err(VortexError::from).map(|b| {
×
UNCOV
38
            debug_assert_eq!(&self.dtype, &DType::from_arrow(b.schema()));
×
39
            ArrayRef::from_arrow(b, false)
×
40
        }))
×
UNCOV
41
    }
×
42
}
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