-
Notifications
You must be signed in to change notification settings - Fork 19
Upgrade to DF v51 #236
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
Merged
Upgrade to DF v51 #236
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| [toolchain] | ||
| channel = "1.86.0" | ||
| channel = "1.88.0" | ||
| profile = "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,8 +160,8 @@ pub fn df_metrics_set_to_proto( | |
| Err(err) => { | ||
| // Check if this is the specific custom metrics error we want to filter out | ||
| if let DataFusionError::Internal(msg) = &err { | ||
| if msg == CUSTOM_METRICS_NOT_SUPPORTED { | ||
| // Filter out custom metrics error - continue processing other metrics | ||
| if msg == CUSTOM_METRICS_NOT_SUPPORTED || msg == UNSUPPORTED_METRICS { | ||
| // Filter out custom/unsupported metrics error - continue processing other metrics | ||
| continue; | ||
| } | ||
| } | ||
|
|
@@ -191,6 +191,9 @@ pub fn metrics_set_proto_to_df( | |
| const CUSTOM_METRICS_NOT_SUPPORTED: &str = | ||
| "custom metrics are not supported in metrics proto conversion"; | ||
|
|
||
| /// New DataFusion metrics that are not yet supported in proto conversion. | ||
| const UNSUPPORTED_METRICS: &str = "metric type not supported in proto conversion"; | ||
|
|
||
| /// df_metric_to_proto converts a `datafusion::physical_plan::metrics::Metric` to a `MetricProto`. It does not consume the Arc<Metric>. | ||
| pub fn df_metric_to_proto(metric: Arc<Metric>) -> Result<MetricProto, DataFusionError> { | ||
| let partition = metric.partition().map(|p| p as u64); | ||
|
|
@@ -285,6 +288,10 @@ pub fn df_metric_to_proto(metric: Arc<Metric>) -> Result<MetricProto, DataFusion | |
| labels, | ||
| }), | ||
| MetricValue::Custom { .. } => internal_err!("{}", CUSTOM_METRICS_NOT_SUPPORTED), | ||
| MetricValue::OutputBytes(_) | MetricValue::PruningMetrics { .. } | MetricValue::Ratio { .. } => { | ||
| // TODO: Support these metrics | ||
| internal_err!("{}", UNSUPPORTED_METRICS) | ||
|
Comment on lines
+292
to
+293
Collaborator
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. Probably worth opening an issue for supporting this ones.
Collaborator
Author
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. |
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -433,38 +440,33 @@ mod tests { | |
| let roundtrip_count = roundtrip_metrics_set.iter().count(); | ||
| assert_eq!( | ||
| original_count, roundtrip_count, | ||
| "roundtrip should preserve metrics count for {}", | ||
| test_name | ||
| "roundtrip should preserve metrics count for {test_name}" | ||
| ); | ||
|
|
||
| // Verify equivalence of each metric. | ||
| for (original, roundtrip) in metrics_set.iter().zip(roundtrip_metrics_set.iter()) { | ||
| assert_eq!( | ||
| original.partition(), | ||
| roundtrip.partition(), | ||
| "partition mismatch in {}", | ||
| test_name | ||
| "partition mismatch in {test_name}" | ||
| ); | ||
|
|
||
| assert_eq!( | ||
| original.labels().len(), | ||
| roundtrip.labels().len(), | ||
| "label count mismatch in {}", | ||
| test_name | ||
| "label count mismatch in {test_name}" | ||
| ); | ||
|
|
||
| for (orig_label, rt_label) in original.labels().iter().zip(roundtrip.labels().iter()) { | ||
| assert_eq!( | ||
| orig_label.name(), | ||
| rt_label.name(), | ||
| "label name mismatch in {}", | ||
| test_name | ||
| "label name mismatch in {test_name}" | ||
| ); | ||
| assert_eq!( | ||
| orig_label.value(), | ||
| rt_label.value(), | ||
| "label value mismatch in {}", | ||
| test_name | ||
| "label value mismatch in {test_name}" | ||
| ); | ||
| } | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🤔 any chance to leave this as 0.13?
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.
Actually, I checked and nope. The best thing we can do is leave it at 0.14.1