Skip to content

Commit cafc903

Browse files
committed
addressing review
1 parent 9db162c commit cafc903

File tree

6 files changed

+7
-14
lines changed

6 files changed

+7
-14
lines changed

crates/store/re_chunk/src/chunk.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl ChunkComponents {
7474
}
7575

7676
#[inline]
77-
pub fn get_descriptor(
77+
pub fn get_by_descriptor(
7878
&self,
7979
component_desc: &ComponentDescriptor,
8080
) -> Option<&Arrow2ListArray<i32>> {
@@ -83,7 +83,7 @@ impl ChunkComponents {
8383
}
8484

8585
#[inline]
86-
pub fn get_descriptor_mut(
86+
pub fn get_by_descriptor_mut(
8787
&mut self,
8888
component_desc: &ComponentDescriptor,
8989
) -> Option<&mut Arrow2ListArray<i32>> {

crates/store/re_dataframe/src/query.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl<E: StorageEngineLike> QueryHandle<E> {
516516
fn chunk_filter_recursive_only(chunk: &Chunk) -> Option<Chunk> {
517517
let list_array = chunk
518518
.components()
519-
.get_descriptor(&ClearIsRecursive::descriptor())?;
519+
.get_by_descriptor(&ClearIsRecursive::descriptor())?;
520520

521521
let values = list_array
522522
.values()
@@ -1186,7 +1186,7 @@ impl<E: StorageEngineLike> QueryHandle<E> {
11861186
}),
11871187
ColumnDescriptor::Time(_) => None,
11881188
})?;
1189-
unit.components().get_descriptor(&component_desc).map(|list_array| list_array.to_boxed())
1189+
unit.components().get_by_descriptor(&component_desc).map(|list_array| list_array.to_boxed())
11901190
}
11911191
};
11921192

crates/store/re_types_core/src/component_descriptor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ impl std::hash::Hash for ComponentDescriptor {
4343
let archetype_field_name = archetype_field_name.map_or(0, |v| v.hash());
4444
let component_name = component_name.hash();
4545

46+
// NOTE: This is a NoHash type, so we must respect the invariant that `write_XX` is only
47+
// called one, see <https://docs.rs/nohash-hasher/0.2.0/nohash_hasher/trait.IsEnabled.html>.
4648
state.write_u64(archetype_name ^ archetype_field_name ^ component_name);
4749
}
4850
}

crates/viewer/re_space_view/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn diff_component_filter<T: re_types_core::Component>(
5151
.diff
5252
.chunk
5353
.components()
54-
.get_descriptor(&T::descriptor())
54+
.get_by_descriptor(&T::descriptor())
5555
.map_or(false, |list_array| {
5656
list_array
5757
.iter()

examples/rust/dataframe_query/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5353
continue;
5454
}
5555

56-
// engine.engine.read().store().iter_chunks()
57-
5856
let query = QueryExpression {
5957
filtered_index: Some(timeline),
6058
view_contents: Some(

examples/rust/dna/src/main.rs

-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use itertools::Itertools as _;
77
use rerun::{
88
demo_util::{bounce_lerp, color_spiral},
99
external::glam,
10-
ComponentBatch,
1110
};
1211

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

21-
rec.log_component_batches(
22-
"data",
23-
true,
24-
[&rerun::components::Position3D::new(1.0, 2.0, 3.0) as &dyn ComponentBatch],
25-
)?;
26-
2720
rec.set_time_seconds("stable_time", 0f64);
2821

2922
rec.log_static(

0 commit comments

Comments
 (0)