Skip to content
Merged
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
7 changes: 0 additions & 7 deletions datafusion/datasource-parquet/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,9 @@ impl ParquetSource {
self
}

fn with_metrics(mut self, metrics: ExecutionPlanMetricsSet) -> Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removal intentional ?
It is not related to with_predicate()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, with_predicate() is the only place calling this deleted function, and now it's removed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right!
with_metrics() was private!
But there is no setter for metrics now... How is it supposed to be used ? Use directly the field ?!

self.metrics = metrics;
self
}

/// Set predicate information
pub fn with_predicate(&self, predicate: Arc<dyn PhysicalExpr>) -> Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is a bit strange.
The other with_**() methods accept mut self and modify in-place. Only this method accepts &self and makes a clone of itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it would be nice to figure out why there is this discrepancy

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #17917 to track

let mut conf = self.clone();
let metrics = ExecutionPlanMetricsSet::new();
conf = conf.with_metrics(metrics);
conf.predicate = Some(Arc::clone(&predicate));
conf
}
Expand Down
Loading