Skip to content

Commit

Permalink
more zombie code
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Oct 11, 2024
1 parent 28cf332 commit 8e5a8d7
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions crates/store/re_dataframe/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,13 @@ impl QueryHandle<'_> {
metadata: Default::default(),
};

let using_index_values_stack = self
.query
.using_index_values
.as_ref()
.map(|values| values.iter().rev().copied().collect_vec());

// 4. Perform the query and keep track of all the relevant chunks.
let query = {
let index_range =
if let Some(using_index_values_stack) = using_index_values_stack.as_ref() {
using_index_values_stack
.last() // reminder: it's reversed (stack)
.and_then(|start| using_index_values_stack.first().map(|end| (start, end)))
if let Some(using_index_values) = self.query.using_index_values.as_ref() {
using_index_values
.first()
.and_then(|start| using_index_values.last().map(|end| (start, end)))
.map_or(ResolvedTimeRange::EMPTY, |(start, end)| {
ResolvedTimeRange::new(*start, *end)
})
Expand Down Expand Up @@ -266,10 +260,8 @@ impl QueryHandle<'_> {
//
// Used to achieve ~O(log(n)) pagination.
let unique_index_values =
if let Some(using_index_values_stack) = using_index_values_stack.as_ref() {
let mut all_unique_index_values = using_index_values_stack.clone();
all_unique_index_values.sort();
all_unique_index_values
if let Some(using_index_values) = self.query.using_index_values.as_ref() {
using_index_values.iter().copied().collect_vec()
} else {
re_tracing::profile_scope!("index_values");

Expand Down

0 comments on commit 8e5a8d7

Please sign in to comment.