Skip to content

Commit 3e3e40d

Browse files
committed
minor cleaning
1 parent b1a05e2 commit 3e3e40d

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

rerun_py/src/catalog/dataset_entry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ impl PyDatasetEntryInternal {
890890
segment_ids: Vec<String>,
891891
) -> super::PyDatasetViewInternal {
892892
let filter: std::collections::HashSet<String> = segment_ids.into_iter().collect();
893-
super::PyDatasetViewInternal::new(Py::from(self_), Some(filter), vec![])
893+
super::PyDatasetViewInternal::new(Py::from(self_), Some(filter), None)
894894
}
895895

896896
/// Returns a new `DatasetView` filtered to the given entity paths.
@@ -905,7 +905,7 @@ impl PyDatasetEntryInternal {
905905
/// DatasetViewInternal
906906
/// A new view filtered to the given entity paths.
907907
fn filter_contents(self_: PyRef<'_, Self>, exprs: Vec<String>) -> super::PyDatasetViewInternal {
908-
super::PyDatasetViewInternal::new(Py::from(self_), None, exprs)
908+
super::PyDatasetViewInternal::new(Py::from(self_), None, Some(exprs))
909909
}
910910

911911
pub fn __str__(self_: PyRef<'_, Self>) -> String {

rerun_py/src/catalog/dataset_view.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use arrow::pyarrow::PyArrowType;
66
use datafusion::catalog::TableProvider;
77
use datafusion_ffi::table_provider::FFI_TableProvider;
88
use pyo3::prelude::PyAnyMethods as _;
9-
use pyo3::types::{PyDict, PyDictMethods as _, PyCapsule};
9+
use pyo3::types::{PyCapsule, PyDict, PyDictMethods as _};
1010
use pyo3::{Bound, Py, PyAny, PyRef, PyResult, Python, pyclass, pymethods};
1111
use re_chunk_store::{QueryExpression, SparseFillStrategy, ViewContentsSelector};
1212
use re_datafusion::DataframeQueryTableProvider;
@@ -30,7 +30,8 @@ pub struct PyDatasetViewInternal {
3030
// logical plan and lazily execute it instead of materializing the segment IDs.
3131
segment_filter: Option<HashSet<String>>,
3232

33-
/// Content filters: entity path expressions like "/points/**", "-/text/**"
33+
/// Content filters: entity path expressions like "/points/**", "-/text/**". If empty,
34+
/// everything is included.
3435
content_filters: Vec<String>,
3536
}
3637

@@ -39,12 +40,12 @@ impl PyDatasetViewInternal {
3940
pub fn new(
4041
dataset: Py<PyDatasetEntryInternal>,
4142
segment_filter: Option<HashSet<String>>,
42-
content_filters: Vec<String>,
43+
content_filters: Option<Vec<String>>,
4344
) -> Self {
4445
Self {
4546
dataset,
4647
segment_filter,
47-
content_filters,
48+
content_filters: content_filters.unwrap_or_default(),
4849
}
4950
}
5051

@@ -563,7 +564,7 @@ impl PyDatasetViewInternal {
563564
Self::new(
564565
self_.dataset.clone_ref(py),
565566
Some(combined_filter),
566-
self_.content_filters.clone(),
567+
Some(self_.content_filters.clone()),
567568
),
568569
)
569570
}
@@ -586,7 +587,7 @@ impl PyDatasetViewInternal {
586587
Self::new(
587588
self_.dataset.clone_ref(py),
588589
self_.segment_filter.clone(),
589-
combined_filters,
590+
Some(combined_filters),
590591
),
591592
)
592593
}

0 commit comments

Comments
 (0)