Skip to content

Commit

Permalink
self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jan 18, 2024
1 parent 3f06fb2 commit f9f71a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions crates/re_query_cache/src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ macro_rules! impl_query_archetype_range {
re_tracing::profile_scope!("iter");

let entry_range = bucket.entry_range(time_range);
dbg!(&entry_range);

let it = itertools::izip!(
bucket.range_data_times(entry_range.clone()),
Expand Down Expand Up @@ -180,15 +179,11 @@ macro_rules! impl_query_archetype_range {
let mut range_callback = |query: &RangeQuery, range_cache: &mut crate::RangeCache| {
re_tracing::profile_scope!("range", format!("{query:?}"));

eprintln!("query 1: {query:?}");

// NOTE: Same logic as what the store does.
if query.range.min <= TimeInt::MIN {
let mut reduced_query = query.clone();
reduced_query.range.max = TimeInt::MIN; // inclusive

eprintln!("query timeless: {reduced_query:?}");

// NOTE: `+ 2` because we always grab the indicator component as well as the
// instance keys.
let arch_views =
Expand All @@ -205,10 +200,7 @@ macro_rules! impl_query_archetype_range {
let mut query = query.clone();
query.range.min = TimeInt::max((TimeInt::MIN.as_i64() + 1).into(), query.range.min);

eprintln!("query 2: {query:?}");

for reduced_query in range_cache.compute_queries(&query) {
eprintln!("query 2: {reduced_query:?}");
// NOTE: `+ 2` because we always grab the indicator component as well as the
// instance keys.
let arch_views =
Expand Down
4 changes: 1 addition & 3 deletions crates/re_query_cache/tests/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ fn timeless_range() {

// --- Third test: `[-inf, +inf]` ---

eprintln!("XXXXXXXXXXXXXXXXXXXXXXXX");

let query =
re_data_store::RangeQuery::new(timepoint1[0].0, TimeRange::new(TimeInt::MIN, TimeInt::MAX));

Expand Down Expand Up @@ -363,7 +361,7 @@ fn query_and_compare(store: &DataStore, query: &RangeQuery, ent_path: &EntityPat
}

// Keep this around for the next unlucky chap.
eprintln!("(expected={expected_data_times:?}, uncached={uncached_data_times:?}, cached={cached_data_times:?})");
// eprintln!("(expected={expected_data_times:?}, uncached={uncached_data_times:?}, cached={cached_data_times:?})");
// eprintln!("{}", store.to_data_table().unwrap());

similar_asserts::assert_eq!(expected_data_times, uncached_data_times);
Expand Down

0 comments on commit f9f71a7

Please sign in to comment.