Skip to content

Commit

Permalink
Add Loggable::arrow_empty with default impl
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jan 9, 2025
1 parent 09a97ca commit 4a735e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/store/re_types_core/src/loggable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes {
/// The underlying [`arrow::datatypes::DataType`], excluding datatype extensions.
fn arrow_datatype() -> arrow::datatypes::DataType;

// Returns an empty Arrow array that matches this `Loggable`'s underlying datatype.
#[inline]
fn arrow_empty() -> arrow::array::ArrayRef {
arrow::array::new_empty_array(&Self::arrow_datatype())
}

/// Given an iterator of owned or reference values to the current [`Loggable`], serializes
/// them into an Arrow array.
///
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/check_large_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"crates/store/re_dataframe/src/query.rs",
"crates/store/re_types/src/datatypes/tensor_buffer.rs",
"crates/store/re_types/src/reflection/mod.rs",
"crates/top/re_sdk/src/recording_stream.rs",
"crates/viewer/re_ui/data/Inter-Medium.otf",
"docs/snippets/INDEX.md",
"pixi.lock",
Expand Down

0 comments on commit 4a735e1

Please sign in to comment.