Skip to content
Open
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: 2 additions & 4 deletions datafusion/datasource-parquet/src/opener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,8 @@ mod test {
}

fn make_dynamic_expr(expr: Arc<dyn PhysicalExpr>) -> Arc<dyn PhysicalExpr> {
Arc::new(DynamicFilterPhysicalExpr::new(
expr.children().into_iter().map(Arc::clone).collect(),
expr,
))
let children = expr.children().into_iter().map(Arc::clone).collect();
Arc::new(DynamicFilterPhysicalExpr::new(expr, children))
}

#[tokio::test]
Expand Down
16 changes: 13 additions & 3 deletions datafusion/execution/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ pub struct Metric {
/// will be shown.
/// - When set to `summary`, only metrics with type `MetricType::Summary` are shown.
///
/// # Difference from `EXPLAIN ANALYZE VERBOSE`:
/// The `VERBOSE` keyword controls whether per-partition metrics are shown (when specified),
/// or aggregated metrics are displayed (when omitted).
/// # Difference from `EXPLAIN ANALYZE VERBOSE`:
/// The `VERBOSE` keyword controls whether per-partition metrics are shown (when specified),
/// or aggregated metrics are displayed (when omitted).
/// In contrast, the `analyze_level` configuration determines which categories or
/// levels of metrics are displayed.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -213,6 +213,16 @@ impl MetricsSet {
Default::default()
}

/// Return a number of metrics.
pub fn len(&self) -> usize {
self.metrics.len()
}

/// Check if the set is empty.
pub fn is_empty(&self) -> bool {
self.len() == 0
}

/// Add the specified metric
pub fn push(&mut self, metric: Arc<Metric>) {
self.metrics.push(metric)
Expand Down
Loading