-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: ParquetSource - with_predicate() don't have to reset metrics
#17858
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -313,16 +313,9 @@ impl ParquetSource { | |
| self | ||
| } | ||
|
|
||
| fn with_metrics(mut self, metrics: ExecutionPlanMetricsSet) -> Self { | ||
| self.metrics = metrics; | ||
| self | ||
| } | ||
|
|
||
| /// Set predicate information | ||
| pub fn with_predicate(&self, predicate: Arc<dyn PhysicalExpr>) -> Self { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method is a bit strange.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| } | ||
|
|
||
There was a problem hiding this comment.
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()There was a problem hiding this comment.
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 removedThere was a problem hiding this comment.
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
metricsnow... How is it supposed to be used ? Use directly the field ?!