Skip to content

Commit 7d13956

Browse files
authored
Support filtering by timestamp columns (#11227)
1 parent 7b5245f commit 7d13956

File tree

79 files changed

+4395
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+4395
-195
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7783,6 +7783,7 @@ dependencies = [
77837783
"egui_table",
77847784
"insta",
77857785
"itertools 0.14.0",
7786+
"jiff",
77867787
"nohash-hasher",
77877788
"parking_lot",
77887789
"re_arrow_util",

crates/store/re_types_core/src/component_descriptor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ impl ComponentDescriptor {
158158
// TODO(cmc): we really shouldn't be duplicating these.
159159

160160
/// The key used to identify the [`crate::ArchetypeName`] in field-level metadata.
161-
const FIELD_METADATA_KEY_ARCHETYPE: &str = "rerun:archetype";
161+
pub const FIELD_METADATA_KEY_ARCHETYPE: &str = "rerun:archetype";
162162

163163
/// The key used to identify the [`crate::ComponentIdentifier`] in field-level metadata.
164-
const FIELD_METADATA_KEY_COMPONENT: &str = "rerun:component";
164+
pub const FIELD_METADATA_KEY_COMPONENT: &str = "rerun:component";
165165

166166
/// The key used to identify the [`crate::ComponentType`] in field-level metadata.
167-
const FIELD_METADATA_KEY_COMPONENT_TYPE: &str = "rerun:component_type";
167+
pub const FIELD_METADATA_KEY_COMPONENT_TYPE: &str = "rerun:component_type";
168168

169169
impl From<arrow::datatypes::Field> for ComponentDescriptor {
170170
#[inline]

crates/store/re_types_core/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ pub use self::{
3939
arrow_string::ArrowString,
4040
as_components::AsComponents,
4141
component_batch::{ComponentBatch, SerializedComponentBatch, SerializedComponentColumn},
42-
component_descriptor::ComponentDescriptor,
42+
component_descriptor::{
43+
ComponentDescriptor, FIELD_METADATA_KEY_ARCHETYPE, FIELD_METADATA_KEY_COMPONENT,
44+
FIELD_METADATA_KEY_COMPONENT_TYPE,
45+
},
4346
id::{ChunkId, RowId},
4447
loggable::{
4548
Component, ComponentDescriptorSet, ComponentType, DatatypeName, Loggable,

crates/viewer/re_dataframe_ui/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ egui.workspace = true
4242
egui_dnd.workspace = true
4343
egui_table.workspace = true
4444
itertools.workspace = true
45+
jiff.workspace = true
4546
nohash-hasher.workspace = true
4647
parking_lot.workspace = true
4748
serde.workspace = true

crates/viewer/re_dataframe_ui/src/datafusion_table_widget.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,11 @@ impl<'a> DataFusionTableWidget<'a> {
383383
title_ui(ui, Some(&mut table_config), title, url, should_show_spinner);
384384
}
385385

386-
filter_state.filter_bar_ui(ui, &mut new_blueprint);
386+
filter_state.filter_bar_ui(
387+
ui,
388+
viewer_ctx.app_options().timestamp_format,
389+
&mut new_blueprint,
390+
);
387391

388392
apply_table_style_fixes(ui.style_mut());
389393

crates/viewer/re_dataframe_ui/src/filters/boolean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl NonNullableBooleanFilter {
3636
DataType::List(field) | DataType::ListView(field)
3737
if field.data_type() == &DataType::Boolean =>
3838
{
39-
// `ANY` semantics""
39+
// `ANY` semantics
4040
Ok(array_has(col(column.clone()), lit(self.as_bool())))
4141
}
4242

0 commit comments

Comments
 (0)