Skip to content

Commit

Permalink
addressing review
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Dec 9, 2024
1 parent 2d93b59 commit 75a382d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions crates/store/re_chunk/src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl ChunkComponents {
}

#[inline]
pub fn get_descriptor(
pub fn get_by_descriptor(
&self,
component_desc: &ComponentDescriptor,
) -> Option<&Arrow2ListArray<i32>> {
Expand All @@ -83,7 +83,7 @@ impl ChunkComponents {
}

#[inline]
pub fn get_descriptor_mut(
pub fn get_by_descriptor_mut(
&mut self,
component_desc: &ComponentDescriptor,
) -> Option<&mut Arrow2ListArray<i32>> {
Expand Down
4 changes: 2 additions & 2 deletions crates/store/re_dataframe/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ impl<E: StorageEngineLike> QueryHandle<E> {
fn chunk_filter_recursive_only(chunk: &Chunk) -> Option<Chunk> {
let list_array = chunk
.components()
.get_descriptor(&ClearIsRecursive::descriptor())?;
.get_by_descriptor(&ClearIsRecursive::descriptor())?;

let values = list_array
.values()
Expand Down Expand Up @@ -1186,7 +1186,7 @@ impl<E: StorageEngineLike> QueryHandle<E> {
}),
ColumnDescriptor::Time(_) => None,
})?;
unit.components().get_descriptor(&component_desc).map(|list_array| list_array.to_boxed())
unit.components().get_by_descriptor(&component_desc).map(|list_array| list_array.to_boxed())
}
};

Expand Down
2 changes: 2 additions & 0 deletions crates/store/re_types_core/src/component_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ impl std::hash::Hash for ComponentDescriptor {
let archetype_field_name = archetype_field_name.map_or(0, |v| v.hash());
let component_name = component_name.hash();

// NOTE: This is a NoHash type, so we must respect the invariant that `write_XX` is only
// called one, see <https://docs.rs/nohash-hasher/0.2.0/nohash_hasher/trait.IsEnabled.html>.
state.write_u64(archetype_name ^ archetype_field_name ^ component_name);
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_space_view/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn diff_component_filter<T: re_types_core::Component>(
.diff
.chunk
.components()
.get_descriptor(&T::descriptor())
.get_by_descriptor(&T::descriptor())
.map_or(false, |list_array| {
list_array
.iter()
Expand Down
2 changes: 0 additions & 2 deletions examples/rust/dataframe_query/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
continue;
}

// engine.engine.read().store().iter_chunks()

let query = QueryExpression {
filtered_index: Some(timeline),
view_contents: Some(
Expand Down
7 changes: 0 additions & 7 deletions examples/rust/dna/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use itertools::Itertools as _;
use rerun::{
demo_util::{bounce_lerp, color_spiral},
external::glam,
ComponentBatch,
};

const NUM_POINTS: usize = 100;
Expand All @@ -18,12 +17,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let (points1, colors1) = color_spiral(NUM_POINTS, 2.0, 0.02, 0.0, 0.1);
let (points2, colors2) = color_spiral(NUM_POINTS, 2.0, 0.02, TAU * 0.5, 0.1);

rec.log_component_batches(
"data",
true,
[&rerun::components::Position3D::new(1.0, 2.0, 3.0) as &dyn ComponentBatch],
)?;

rec.set_time_seconds("stable_time", 0f64);

rec.log_static(
Expand Down

0 comments on commit 75a382d

Please sign in to comment.