Skip to content

Commit

Permalink
Dataframe v2: never mention indicator components (rerun-io#7656)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored Oct 9, 2024
1 parent 4135249 commit a2705b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
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

0 comments on commit a2705b7

Please sign in to comment.