Skip to content

Commit

Permalink
self review
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Apr 25, 2024
1 parent 5313a5b commit 8177a18
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/re_query_cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "re_query_cache"
authors.workspace = true
description = "Temporary crate meant to replace re_query_cache"
description = "Caching datastructures for re_query"
edition.workspace = true
homepage.workspace = true
include.workspace = true
Expand Down
9 changes: 7 additions & 2 deletions crates/re_query_cache/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# re_query_cache

Temporary crate for implementing the new cached data APIs. Not published.
Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.

Will replace `re_query_cache` when ready.
[![Latest version](https://img.shields.io/crates/v/re_query_cache.svg)](https://crates.io/crates/re_query_cache)
[![Documentation](https://docs.rs/re_query/badge.svg)](https://docs.rs/re_query)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)

Caching datastructures for `re_query`.
3 changes: 1 addition & 2 deletions crates/re_query_cache/src/flat_vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ impl<T: SizeBytes + 'static> ErasedFlatVecDeque for FlatVecDeque<T> {
/// optimizes for writes.
///
/// You can think of this as the native/deserialized version of an Arrow `ListArray`.
/// This is particularly useful when working with many small arrays of data (e.g. Rerun's
/// `TimeSeriesScalar`s).
/// This is particularly useful when working with many small arrays of data (e.g. Rerun's `Scalar`s).
//
// TODO(cmc): We could even use a bitmap for T=Option<Something>, which would bring this that much
// closer to a deserialized version of an Arrow array.
Expand Down
2 changes: 1 addition & 1 deletion crates/re_query_cache/tests/latest_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn splatted_query() {
}

#[test]
fn invalidation_xxx() {
fn invalidation() {
let entity_path = "point";

let test_invalidation = |query: LatestAtQuery,
Expand Down
16 changes: 4 additions & 12 deletions crates/re_space_view_spatial/src/visualizers/results_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,11 @@ impl CachedRangeResultsExt for CachedRangeResults {
// TODO(#5607): what should happen if the promise is still pending?
let (front_status, back_status) = results.status();
match front_status {
PromiseResult::Error(err) => {
return Err(re_query_cache::QueryError::Other(err.into()))
}
PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())),
PromiseResult::Pending | PromiseResult::Ready(_) => {}
}
match back_status {
PromiseResult::Error(err) => {
return Err(re_query_cache::QueryError::Other(err.into()))
}
PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())),
PromiseResult::Pending | PromiseResult::Ready(_) => {}
}

Expand Down Expand Up @@ -134,15 +130,11 @@ impl CachedRangeResultsExt for CachedLatestAtResults {
// TODO(#5607): what should happen if the promise is still pending?
let (front_status, back_status) = data.status();
match front_status {
PromiseResult::Error(err) => {
return Err(re_query_cache::QueryError::Other(err.into()))
}
PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())),
PromiseResult::Pending | PromiseResult::Ready(_) => {}
}
match back_status {
PromiseResult::Error(err) => {
return Err(re_query_cache::QueryError::Other(err.into()))
}
PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())),
PromiseResult::Pending | PromiseResult::Ready(_) => {}
}

Expand Down

0 comments on commit 8177a18

Please sign in to comment.