Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataframe v2: never mention indicator components #7656

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/store/re_chunk_store/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,12 @@ impl ChunkStore {

let components = static_components
.chain(temporal_components)
.filter(|col| match col {
ColumnDescriptor::Time(_) => true,
ColumnDescriptor::Component(descr) => {
!descr.component_name.is_indicator_component()
}
})
.collect::<BTreeSet<_>>();

timelines.chain(components).collect()
Expand Down
12 changes: 6 additions & 6 deletions rerun_py/tests/unit/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_load_recording() -> None:
batches = view.select()
table = pa.Table.from_batches(batches, batches.schema)

# my_index, log_time, log_tick, indicator, text
assert table.num_columns == 5
# my_index, log_time, log_tick, text
assert table.num_columns == 4
assert table.num_rows == 1

recording = rr.dataframe.load_recording(pathlib.Path(tmpdir) / "tmp.rrd")
Expand All @@ -38,8 +38,8 @@ def test_load_recording() -> None:
batches = view.select()
table = pa.Table.from_batches(batches, batches.schema)

# my_index, log_time, log_tick, indicator, text
assert table.num_columns == 5
# my_index, log_time, log_tick, text
assert table.num_columns == 4
assert table.num_rows == 1


Expand Down Expand Up @@ -69,8 +69,8 @@ def test_full_view(self) -> None:
batches = view.select()
table = pa.Table.from_batches(batches, batches.schema)

# my_index, log_time, log_tick, indicator, points, colors
assert table.num_columns == 6
# my_index, log_time, log_tick, points, colors
assert table.num_columns == 5
assert table.num_rows == 2

def test_select_columns(self) -> None:
Expand Down
Loading