Skip to content

Commit

Permalink
this is now possible
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Sep 4, 2024
1 parent df1ab30 commit b1d1c51
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions crates/store/re_dataframe/src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ impl RangeQueryHandle<'_> {
/// while let Some(batch) = query_handle.next_page() {
/// // …
/// }
/// ```
pub fn next_page(&mut self) -> Option<RecordBatch> {
re_tracing::profile_function!(format!("{:?}", self.query));

Expand Down Expand Up @@ -213,22 +214,15 @@ impl RangeQueryHandle<'_> {

ColumnDescriptor::Time(descr) => {
let time_column = pov_chunk.timelines().get(&descr.timeline).cloned();

if cfg!(debug_assertions) {
#[allow(clippy::unwrap_used)] // want to crash in dev
time_column.unwrap().times_array().to_boxed()
} else {
// NOTE: Technically cannot ever happen, but I'd rather that than an uwnrap.
time_column.map_or_else(
|| {
arrow2::array::new_null_array(
descr.datatype.clone(),
pov_chunk.num_rows(),
)
},
|time_column| time_column.times_array().to_boxed(),
)
}
time_column.map_or_else(
|| {
arrow2::array::new_null_array(
descr.datatype.clone(),
pov_chunk.num_rows(),
)
},
|time_column| time_column.times_array().to_boxed(),
)
}

ColumnDescriptor::Component(descr) => list_arrays.get(descr).map_or_else(
Expand Down

0 comments on commit b1d1c51

Please sign in to comment.