Skip to content

Commit

Permalink
make 'protected_gc_clear' test free of join semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jan 23, 2024
1 parent a9701dc commit ebac1db
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions crates/re_data_store/tests/data_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,7 @@ fn gc_impl(store: &mut DataStore) {
}

sanity_unwrap(store);
// TODO
// _ = store.to_dataframe(); // simple way of checking that everything is still readable
_ = store.to_data_table(); // simple way of checking that everything is still readable

let stats = DataStoreStats::from_store(store);

Expand Down Expand Up @@ -951,8 +950,6 @@ fn protected_gc_clear() {
}
}

// TODO: rewrite that one so it doesn't require join semantics

fn protected_gc_clear_impl(store: &mut DataStore) {
init_logs();

Expand Down Expand Up @@ -994,22 +991,25 @@ fn protected_gc_clear_impl(store: &mut DataStore) {

let assert_latest_components = |frame_nr: TimeInt, rows: &[(ComponentName, &DataRow)]| {
let timeline_frame_nr = Timeline::new("frame_nr", TimeType::Sequence);
let components_all = &[Color::name(), Position2D::name()];

// TODO
// let df = polars_util::latest_components(
// store,
// &LatestAtQuery::new(timeline_frame_nr, frame_nr),
// &ent_path,
// components_all,
// &JoinType::Outer,
// )
// .unwrap();
//
// let df_expected = joint_df(store.cluster_key(), rows);
//
// store.sort_indices_if_needed();
// assert_eq!(df_expected, df, "{store}");

for (component_name, expected) in rows {
let (_, _, cells) = store
.latest_at::<1>(
&LatestAtQuery::new(timeline_frame_nr, frame_nr),
&ent_path,
*component_name,
&[*component_name],
)
.unwrap();

let expected = expected
.cells
.iter()
.filter(|cell| cell.component_name() == *component_name)
.collect_vec();
let actual = cells.iter().flatten().collect_vec();
assert_eq!(expected, actual);
}
};

// Only points are preserved, since colors were cleared and then GC'd
Expand Down

0 comments on commit ebac1db

Please sign in to comment.