From 27cb69f8d95da5268fa971d7e9f03e97bcab2034 Mon Sep 17 00:00:00 2001
From: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
Date: Fri, 9 Aug 2024 17:19:11 +0200
Subject: [PATCH] Query editor for the dataframe view (#7071)
### What
- Fixes https://github.com/rerun-io/rerun/issues/7065
- Supersedes #6961
This PR introduce a new blueprint archetype and related bespoke UI to
configure the query underlying a dataframe view. As a consequence of
this new scheme, Visible Time Range is no longer shown in dataframe view
selection panel.
### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7071?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7071?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide
- [PR Build Summary](https://build.rerun.io/pr/7071)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
---
Cargo.lock | 2 +-
crates/store/re_types/Cargo.toml | 1 +
.../rerun/blueprint/archetypes.fbs | 2 +-
.../blueprint/archetypes/dataframe_query.fbs | 52 +++
.../archetypes/dataframe_view_mode.fbs | 14 -
.../rerun/blueprint/components.fbs | 5 +-
.../components/dataframe_view_mode.fbs | 21 --
.../components/latest_at_queries.fbs | 14 +
.../rerun/blueprint/components/query_kind.fbs | 16 +
.../components/time_range_queries.fbs | 14 +
.../blueprint/components/timeline_name.fbs | 14 +
.../definitions/rerun/blueprint/datatypes.fbs | 2 +
.../blueprint/datatypes/latest_at_query.fbs | 15 +
.../blueprint/datatypes/time_range_query.fbs | 18 +
.../src/blueprint/archetypes/.gitattributes | 2 +-
.../blueprint/archetypes/dataframe_query.rs | 275 ++++++++++++++
.../archetypes/dataframe_view_mode.rs | 163 ---------
.../re_types/src/blueprint/archetypes/mod.rs | 4 +-
.../src/blueprint/components/.gitattributes | 5 +-
.../blueprint/components/latest_at_queries.rs | 183 ++++++++++
.../components/latest_at_queries_ext.rs | 22 ++
.../re_types/src/blueprint/components/mod.rs | 13 +-
.../{dataframe_view_mode.rs => query_kind.rs} | 39 +-
.../components/time_range_queries.rs | 183 ++++++++++
.../components/time_range_queries_ext.rs | 22 ++
.../src/blueprint/components/timeline_name.rs | 105 ++++++
.../blueprint/components/timeline_name_ext.rs | 22 ++
.../src/blueprint/datatypes/.gitattributes | 2 +
.../blueprint/datatypes/latest_at_query.rs | 284 +++++++++++++++
.../datatypes/latest_at_query_ext.rs | 12 +
.../re_types/src/blueprint/datatypes/mod.rs | 6 +
.../blueprint/datatypes/time_range_query.rs | 343 ++++++++++++++++++
.../datatypes/time_range_query_ext.rs | 12 +
crates/viewer/re_edit_ui/src/lib.rs | 8 +-
crates/viewer/re_edit_ui/src/timeline.rs | 38 ++
crates/viewer/re_selection_panel/Cargo.toml | 1 -
.../src/visible_time_range_ui.rs | 2 -
.../src/latest_at_table.rs | 20 +-
.../viewer/re_space_view_dataframe/src/lib.rs | 2 +
.../src/query_kind_ui.rs | 214 +++++++++++
.../src/space_view_class.rs | 139 +++----
.../src/time_range_table.rs | 49 ++-
.../re_space_view_dataframe/src/utils.rs | 2 +-
.../re_space_view_dataframe/src/view_query.rs | 287 +++++++++++++++
.../src/blueprint/validation_gen/mod.rs | 10 +-
crates/viewer/re_viewer/src/reflection/mod.rs | 58 ++-
.../re_viewer_context/src/time_drag_value.rs | 2 +-
.../src/view_properties.rs | 10 +-
rerun_cpp/src/rerun/blueprint/archetypes.hpp | 2 +-
.../rerun/blueprint/archetypes/.gitattributes | 4 +-
.../blueprint/archetypes/dataframe_query.cpp | 49 +++
.../blueprint/archetypes/dataframe_query.hpp | 107 ++++++
.../archetypes/dataframe_view_mode.cpp | 34 --
.../archetypes/dataframe_view_mode.hpp | 58 ---
rerun_cpp/src/rerun/blueprint/components.hpp | 5 +-
.../rerun/blueprint/components/.gitattributes | 9 +-
.../components/latest_at_queries.cpp | 81 +++++
.../components/latest_at_queries.hpp | 65 ++++
...dataframe_view_mode.cpp => query_kind.cpp} | 29 +-
...dataframe_view_mode.hpp => query_kind.hpp} | 25 +-
.../components/time_range_queries.cpp | 81 +++++
.../components/time_range_queries.hpp | 65 ++++
.../blueprint/components/timeline_name.hpp | 63 ++++
rerun_cpp/src/rerun/blueprint/datatypes.hpp | 2 +
.../rerun/blueprint/datatypes/.gitattributes | 4 +
.../blueprint/datatypes/latest_at_query.cpp | 86 +++++
.../blueprint/datatypes/latest_at_query.hpp | 56 +++
.../blueprint/datatypes/time_range_query.cpp | 98 +++++
.../blueprint/datatypes/time_range_query.hpp | 59 +++
.../rerun/blueprint/archetypes/.gitattributes | 2 +-
.../rerun/blueprint/archetypes/__init__.py | 4 +-
.../blueprint/archetypes/dataframe_query.py | 123 +++++++
.../archetypes/dataframe_view_mode.py | 65 ----
.../rerun/blueprint/components/.gitattributes | 5 +-
.../rerun/blueprint/components/__init__.py | 46 ++-
.../components/dataframe_view_mode.py | 90 -----
.../blueprint/components/latest_at_queries.py | 88 +++++
.../rerun/blueprint/components/query_kind.py | 75 ++++
.../components/time_range_queries.py | 89 +++++
.../blueprint/components/timeline_name.py | 36 ++
.../rerun/blueprint/datatypes/.gitattributes | 2 +
.../rerun/blueprint/datatypes/__init__.py | 24 ++
.../blueprint/datatypes/latest_at_query.py | 100 +++++
.../datatypes/latest_at_query_ext.py | 17 +
.../blueprint/datatypes/time_range_query.py | 117 ++++++
.../datatypes/time_range_query_ext.py | 24 ++
86 files changed, 3941 insertions(+), 677 deletions(-)
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs
delete mode 100644 crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_view_mode.fbs
delete mode 100644 crates/store/re_types/definitions/rerun/blueprint/components/dataframe_view_mode.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/components/latest_at_queries.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/components/query_kind.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/components/time_range_queries.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/components/timeline_name.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/datatypes/latest_at_query.fbs
create mode 100644 crates/store/re_types/definitions/rerun/blueprint/datatypes/time_range_query.fbs
create mode 100644 crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs
delete mode 100644 crates/store/re_types/src/blueprint/archetypes/dataframe_view_mode.rs
create mode 100644 crates/store/re_types/src/blueprint/components/latest_at_queries.rs
create mode 100644 crates/store/re_types/src/blueprint/components/latest_at_queries_ext.rs
rename crates/store/re_types/src/blueprint/components/{dataframe_view_mode.rs => query_kind.rs} (71%)
create mode 100644 crates/store/re_types/src/blueprint/components/time_range_queries.rs
create mode 100644 crates/store/re_types/src/blueprint/components/time_range_queries_ext.rs
create mode 100644 crates/store/re_types/src/blueprint/components/timeline_name.rs
create mode 100644 crates/store/re_types/src/blueprint/components/timeline_name_ext.rs
create mode 100644 crates/store/re_types/src/blueprint/datatypes/latest_at_query.rs
create mode 100644 crates/store/re_types/src/blueprint/datatypes/latest_at_query_ext.rs
create mode 100644 crates/store/re_types/src/blueprint/datatypes/time_range_query.rs
create mode 100644 crates/store/re_types/src/blueprint/datatypes/time_range_query_ext.rs
create mode 100644 crates/viewer/re_edit_ui/src/timeline.rs
create mode 100644 crates/viewer/re_space_view_dataframe/src/query_kind_ui.rs
create mode 100644 crates/viewer/re_space_view_dataframe/src/view_query.rs
create mode 100644 rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp
create mode 100644 rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.hpp
delete mode 100644 rerun_cpp/src/rerun/blueprint/archetypes/dataframe_view_mode.cpp
delete mode 100644 rerun_cpp/src/rerun/blueprint/archetypes/dataframe_view_mode.hpp
create mode 100644 rerun_cpp/src/rerun/blueprint/components/latest_at_queries.cpp
create mode 100644 rerun_cpp/src/rerun/blueprint/components/latest_at_queries.hpp
rename rerun_cpp/src/rerun/blueprint/components/{dataframe_view_mode.cpp => query_kind.cpp} (67%)
rename rerun_cpp/src/rerun/blueprint/components/{dataframe_view_mode.hpp => query_kind.hpp} (59%)
create mode 100644 rerun_cpp/src/rerun/blueprint/components/time_range_queries.cpp
create mode 100644 rerun_cpp/src/rerun/blueprint/components/time_range_queries.hpp
create mode 100644 rerun_cpp/src/rerun/blueprint/components/timeline_name.hpp
create mode 100644 rerun_cpp/src/rerun/blueprint/datatypes/latest_at_query.cpp
create mode 100644 rerun_cpp/src/rerun/blueprint/datatypes/latest_at_query.hpp
create mode 100644 rerun_cpp/src/rerun/blueprint/datatypes/time_range_query.cpp
create mode 100644 rerun_cpp/src/rerun/blueprint/datatypes/time_range_query.hpp
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/archetypes/dataframe_query.py
delete mode 100644 rerun_py/rerun_sdk/rerun/blueprint/archetypes/dataframe_view_mode.py
delete mode 100644 rerun_py/rerun_sdk/rerun/blueprint/components/dataframe_view_mode.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/components/latest_at_queries.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/components/query_kind.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/components/time_range_queries.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/components/timeline_name.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/datatypes/latest_at_query.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/datatypes/latest_at_query_ext.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/datatypes/time_range_query.py
create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/datatypes/time_range_query_ext.py
diff --git a/Cargo.lock b/Cargo.lock
index ef203d614ee1..2b4650374dd9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4858,7 +4858,6 @@ dependencies = [
"re_log",
"re_log_types",
"re_space_view",
- "re_space_view_dataframe",
"re_space_view_spatial",
"re_space_view_time_series",
"re_tracing",
@@ -5154,6 +5153,7 @@ dependencies = [
"re_build_tools",
"re_format",
"re_log",
+ "re_log_types",
"re_tracing",
"re_types_builder",
"re_types_core",
diff --git a/crates/store/re_types/Cargo.toml b/crates/store/re_types/Cargo.toml
index 3ba68c8b578b..74bb2546817f 100644
--- a/crates/store/re_types/Cargo.toml
+++ b/crates/store/re_types/Cargo.toml
@@ -51,6 +51,7 @@ testing = []
# Rerun
re_format.workspace = true
re_log.workspace = true
+re_log_types.workspace = true
re_tracing.workspace = true
re_types_core.workspace = true
diff --git a/crates/store/re_types/definitions/rerun/blueprint/archetypes.fbs b/crates/store/re_types/definitions/rerun/blueprint/archetypes.fbs
index b5fefe42a8c6..f6e6710b96b3 100644
--- a/crates/store/re_types/definitions/rerun/blueprint/archetypes.fbs
+++ b/crates/store/re_types/definitions/rerun/blueprint/archetypes.fbs
@@ -2,7 +2,7 @@
include "./archetypes/background.fbs";
include "./archetypes/container_blueprint.fbs";
-include "./archetypes/dataframe_view_mode.fbs";
+include "./archetypes/dataframe_query.fbs";
include "./archetypes/panel_blueprint.fbs";
include "./archetypes/plot_legend.fbs";
include "./archetypes/scalar_axis.fbs";
diff --git a/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs b/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs
new file mode 100644
index 000000000000..537da475465f
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs
@@ -0,0 +1,52 @@
+namespace rerun.blueprint.archetypes;
+
+
+// Rationale behind the present data modelling:
+// - Avoid using `union` at all cost.
+// - An explicit "mode" enum maps well with a UI toggle and API parameter, and enabled a hard disambiguation when
+// settings are present for both the latest at and range modes.
+// - Timestamps are hard-invalidated by a change of timeline. So we keep them on a per-timeline basis.
+
+// TODO(#7067): add visible components (maybe in another archetype?)
+// TODO(#7072): add (optional) PoV components
+// Note: component list should be modelled as:
+// component PovComponents {
+// datatype ComponentNames {
+// value: [string];
+// }
+// }
+//
+// Motivation:
+// - Chances are high that the user prefers to have their pov components _not_ invalidated by a changeof timeline.
+// - That is even though a component might _technically_ be soft-invalidated by a change of timeline (e.g. if it was
+// not logged on that particular timeline). But we have to deal regardless with potentially invalid component, so this
+// doesn't change the story much.
+
+// --
+
+/// The query for the dataframe view.
+table DataframeQuery (
+ "attr.rerun.scope": "blueprint",
+ "attr.rust.generate_field_info"
+) {
+ // --- Optional ---
+
+ /// The timeline for this query.
+ ///
+ /// If unset, use the time panel's timeline and a latest at query, ignoring all other components of this archetype.
+ timeline: rerun.blueprint.components.TimelineName ("attr.rerun.component_optional", nullable, order: 100);
+
+ /// Kind of query: latest-at or range.
+ kind: rerun.blueprint.components.QueryKind ("attr.rerun.component_optional", nullable,order: 200);
+
+ /// Configuration for latest-at queries.
+ ///
+ /// Note: configuration as saved on a per-timeline basis.
+ latest_at_queries: rerun.blueprint.components.LatestAtQueries ("attr.rerun.component_optional", nullable,order: 400);
+
+ /// Configuration for the time range queries.
+ ///
+ /// Note: configuration as saved on a per-timeline basis.
+ time_range_queries: rerun.blueprint.components.TimeRangeQueries ("attr.rerun.component_optional", nullable,order: 500);
+}
+
diff --git a/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_view_mode.fbs b/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_view_mode.fbs
deleted file mode 100644
index 86dba394426f..000000000000
--- a/crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_view_mode.fbs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace rerun.blueprint.archetypes;
-
-
-/// Configuration for the dataframe view
-table DataframeViewMode (
- "attr.rerun.scope": "blueprint",
- "attr.rust.derive": "Copy",
- "attr.rust.generate_field_info"
-) {
- // --- Optional ---
-
- /// The kind of table to display
- mode: rerun.blueprint.components.DataframeViewMode ("attr.rerun.component_optional", nullable, order: 1000);
-}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components.fbs b/crates/store/re_types/definitions/rerun/blueprint/components.fbs
index 1c1fb76aa8fc..95262a56a7e0 100644
--- a/crates/store/re_types/definitions/rerun/blueprint/components.fbs
+++ b/crates/store/re_types/definitions/rerun/blueprint/components.fbs
@@ -7,14 +7,15 @@ include "./components/background_kind.fbs";
include "./components/column_share.fbs";
include "./components/container_kind.fbs";
include "./components/corner_2d.fbs";
-include "./components/dataframe_view_mode.fbs";
include "./components/grid_columns.fbs";
include "./components/included_content.fbs";
include "./components/included_space_view.fbs";
include "./components/interactive.fbs";
+include "./components/latest_at_queries.fbs";
include "./components/lock_range_during_zoom.fbs";
include "./components/panel_state.fbs";
include "./components/query_expression.fbs";
+include "./components/query_kind.fbs";
include "./components/root_container.fbs";
include "./components/row_share.fbs";
include "./components/sort_key.fbs";
@@ -23,6 +24,8 @@ include "./components/space_view_class.fbs";
include "./components/space_view_maximized.fbs";
include "./components/space_view_origin.fbs";
include "./components/tensor_dimension_index_slider.fbs";
+include "./components/time_range_queries.fbs";
+include "./components/timeline_name.fbs";
include "./components/view_fit.fbs";
include "./components/viewer_recommendation_hash.fbs";
include "./components/visible.fbs";
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components/dataframe_view_mode.fbs b/crates/store/re_types/definitions/rerun/blueprint/components/dataframe_view_mode.fbs
deleted file mode 100644
index 10b48a1258b0..000000000000
--- a/crates/store/re_types/definitions/rerun/blueprint/components/dataframe_view_mode.fbs
+++ /dev/null
@@ -1,21 +0,0 @@
-namespace rerun.blueprint.components;
-
-
-/// The kind of table displayed by the dataframe view
-enum DataframeViewMode: ubyte (
- "attr.rerun.scope": "blueprint"
-) {
- /// Invalid value. Won't show up in generated types.
- Invalid = 0,
-
- /// Display the entity values at the current time.
- ///
- /// In this mode, rows are entity instances, and columns are components. The visible time range setting is ignored.
- LatestAt (default),
-
- /// Display a temporal table of entity values.
- ///
- /// In this mode, rows are combination of entity path, timestamp, and row id, and columns are components. The
- /// timestamp shown are determined by each view entity's visible time range setting.
- TimeRange,
-}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components/latest_at_queries.fbs b/crates/store/re_types/definitions/rerun/blueprint/components/latest_at_queries.fbs
new file mode 100644
index 000000000000..2ae62a030694
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/components/latest_at_queries.fbs
@@ -0,0 +1,14 @@
+
+namespace rerun.blueprint.components;
+
+/// Configuration for latest at queries.
+///
+/// Note: configuration as saved on a per-timeline basis.
+table LatestAtQueries (
+ "attr.arrow.transparent",
+ "attr.rust.derive": "Default, PartialEq, Eq",
+ "attr.rust.repr": "transparent",
+ "attr.rerun.scope": "blueprint"
+) {
+ queries: [rerun.blueprint.datatypes.LatestAtQuery] (order: 100);
+}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components/query_kind.fbs b/crates/store/re_types/definitions/rerun/blueprint/components/query_kind.fbs
new file mode 100644
index 000000000000..b4c91f52601a
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/components/query_kind.fbs
@@ -0,0 +1,16 @@
+namespace rerun.blueprint.components;
+
+
+/// The kind of query displayed by the dataframe view
+enum QueryKind: ubyte (
+ "attr.rerun.scope": "blueprint"
+) {
+ /// Invalid value. Won't show up in generated types.
+ Invalid = 0,
+
+ /// Query
+ LatestAt (default),
+
+ /// Time range query.
+ TimeRange,
+}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components/time_range_queries.fbs b/crates/store/re_types/definitions/rerun/blueprint/components/time_range_queries.fbs
new file mode 100644
index 000000000000..cfa60cd84d57
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/components/time_range_queries.fbs
@@ -0,0 +1,14 @@
+
+namespace rerun.blueprint.components;
+
+/// Configuration for time range queries.
+///
+/// Note: configuration as saved on a per-timeline basis.
+table TimeRangeQueries (
+ "attr.arrow.transparent",
+ "attr.rust.derive": "Default, PartialEq, Eq",
+ "attr.rust.repr": "transparent",
+ "attr.rerun.scope": "blueprint"
+) {
+ queries: [rerun.blueprint.datatypes.TimeRangeQuery] (order: 100);
+}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/components/timeline_name.fbs b/crates/store/re_types/definitions/rerun/blueprint/components/timeline_name.fbs
new file mode 100644
index 000000000000..ef03400d2a92
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/components/timeline_name.fbs
@@ -0,0 +1,14 @@
+
+namespace rerun.blueprint.components;
+
+/// A timeline identified by its name.
+table TimelineName (
+ "attr.arrow.transparent",
+ "attr.python.aliases": "str",
+ "attr.python.array_aliases": "str, Sequence[str]",
+ "attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord",
+ "attr.rust.repr": "transparent",
+ "attr.rerun.scope": "blueprint"
+) {
+ value: rerun.datatypes.Utf8 (order: 100);
+}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/datatypes.fbs b/crates/store/re_types/definitions/rerun/blueprint/datatypes.fbs
index 5aaad0c14271..27ed9388ebd5 100644
--- a/crates/store/re_types/definitions/rerun/blueprint/datatypes.fbs
+++ b/crates/store/re_types/definitions/rerun/blueprint/datatypes.fbs
@@ -1,4 +1,6 @@
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/fbs/mod.rs
+include "./datatypes/latest_at_query.fbs";
include "./datatypes/tensor_dimension_index_slider.fbs";
+include "./datatypes/time_range_query.fbs";
include "./datatypes/utf8_list.fbs";
diff --git a/crates/store/re_types/definitions/rerun/blueprint/datatypes/latest_at_query.fbs b/crates/store/re_types/definitions/rerun/blueprint/datatypes/latest_at_query.fbs
new file mode 100644
index 000000000000..eb03f3361352
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/datatypes/latest_at_query.fbs
@@ -0,0 +1,15 @@
+namespace rerun.blueprint.datatypes;
+
+
+/// Latest at query configuration for a specific timeline.
+// Has to be a table because flatbuffer doesn't support strings in structs.
+table LatestAtQuery (
+ "attr.rust.derive": "PartialEq, Eq",
+ "attr.rerun.scope": "blueprint"
+) {
+ /// Name of the timeline this applies to.
+ timeline: rerun.datatypes.Utf8 (order: 100);
+
+ /// Time value to use for this query.
+ time: rerun.datatypes.TimeInt (order: 200);
+}
diff --git a/crates/store/re_types/definitions/rerun/blueprint/datatypes/time_range_query.fbs b/crates/store/re_types/definitions/rerun/blueprint/datatypes/time_range_query.fbs
new file mode 100644
index 000000000000..6b467209e580
--- /dev/null
+++ b/crates/store/re_types/definitions/rerun/blueprint/datatypes/time_range_query.fbs
@@ -0,0 +1,18 @@
+namespace rerun.blueprint.datatypes;
+
+
+/// Time range query configuration for a specific timeline.
+// Has to be a table because flatbuffer doesn't support strings in structs.
+table TimeRangeQuery (
+ "attr.rust.derive": "PartialEq, Eq",
+ "attr.rerun.scope": "blueprint"
+) {
+ /// Name of the timeline this applies to.
+ timeline: rerun.datatypes.Utf8 (order: 100);
+
+ /// Beginning of the time range.
+ start: rerun.datatypes.TimeInt (order: 200);
+
+ /// End of the time range (inclusive).
+ end: rerun.datatypes.TimeInt (order: 300);
+}
diff --git a/crates/store/re_types/src/blueprint/archetypes/.gitattributes b/crates/store/re_types/src/blueprint/archetypes/.gitattributes
index d91f6e760346..51fc7263ee37 100644
--- a/crates/store/re_types/src/blueprint/archetypes/.gitattributes
+++ b/crates/store/re_types/src/blueprint/archetypes/.gitattributes
@@ -2,7 +2,7 @@
.gitattributes linguist-generated=true
background.rs linguist-generated=true
-dataframe_view_mode.rs linguist-generated=true
+dataframe_query.rs linguist-generated=true
mod.rs linguist-generated=true
plot_legend.rs linguist-generated=true
scalar_axis.rs linguist-generated=true
diff --git a/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs
new file mode 100644
index 000000000000..635e3ee6992d
--- /dev/null
+++ b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs
@@ -0,0 +1,275 @@
+// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs
+// Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs".
+
+#![allow(unused_imports)]
+#![allow(unused_parens)]
+#![allow(clippy::clone_on_copy)]
+#![allow(clippy::cloned_instead_of_copied)]
+#![allow(clippy::map_flatten)]
+#![allow(clippy::needless_question_mark)]
+#![allow(clippy::new_without_default)]
+#![allow(clippy::redundant_closure)]
+#![allow(clippy::too_many_arguments)]
+#![allow(clippy::too_many_lines)]
+
+use ::re_types_core::external::arrow2;
+use ::re_types_core::ComponentName;
+use ::re_types_core::SerializationResult;
+use ::re_types_core::{ComponentBatch, MaybeOwnedComponentBatch};
+use ::re_types_core::{DeserializationError, DeserializationResult};
+
+/// **Archetype**: The query for the dataframe view.
+#[derive(Clone, Debug)]
+pub struct DataframeQuery {
+ /// The timeline for this query.
+ ///
+ /// If unset, use the time panel's timeline and a latest at query, ignoring all other components of this archetype.
+ pub timeline: Option,
+
+ /// Kind of query: latest-at or range.
+ pub kind: Option,
+
+ /// Configuration for latest-at queries.
+ ///
+ /// Note: configuration as saved on a per-timeline basis.
+ pub latest_at_queries: Option,
+
+ /// Configuration for the time range queries.
+ ///
+ /// Note: configuration as saved on a per-timeline basis.
+ pub time_range_queries: Option,
+}
+
+impl ::re_types_core::SizeBytes for DataframeQuery {
+ #[inline]
+ fn heap_size_bytes(&self) -> u64 {
+ self.timeline.heap_size_bytes()
+ + self.kind.heap_size_bytes()
+ + self.latest_at_queries.heap_size_bytes()
+ + self.time_range_queries.heap_size_bytes()
+ }
+
+ #[inline]
+ fn is_pod() -> bool {
+