Skip to content
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

Minor: Rename RepartitionMetrics::repartition_time to RepartitionMetrics::repart_time to match metric #11478

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 15, 2024

Draft until #11440 merges

Which issue does this PR close?

None

Rationale for this change

While reviewing #11440 from @korowa it took me a little while to find how the metric was plumbed through. Part of that was that the field name is slightly different

What changes are included in this PR?

Rename a field to match the metric it tracks

Are these changes tested?

By existing CI

Are there any user-facing changes?

No this is entirely internal

@alamb alamb changed the title Alamb/rename field Rename RepartitionMetrics::repartition_time to RepartitionMetrics::repart_time to match metric Jul 15, 2024
@alamb alamb force-pushed the alamb/rename_field branch from c53869c to 44d89a4 Compare July 24, 2024 12:50
@alamb alamb marked this pull request as ready for review July 24, 2024 12:50
@alamb alamb changed the title Rename RepartitionMetrics::repartition_time to RepartitionMetrics::repart_time to match metric Minor: Rename RepartitionMetrics::repartition_time to RepartitionMetrics::repart_time to match metric Jul 24, 2024
Copy link
Contributor

@korowa korowa left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @alamb

@@ -415,7 +415,7 @@ struct RepartitionMetrics {
/// Time in nanos to execute child operator and fetch batches
fetch_time: metrics::Time,
/// Time in nanos to perform repartitioning
repartition_time: metrics::Time,
repart_time: metrics::Time,
Copy link
Member

Choose a reason for hiding this comment

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

to me, the previous name is more readable. do we need this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My rationale was so that the field name matched the display name of this metric (which is repart_time)

(a few lines down from here)

Another potential would be to rename the metric to "repartition_time" which would be a user facing change (which is probably fine).

I think it would be nice to have them consistent. The exact value I have less of an opinion of

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, i agree that consistency is really desirable. Therefore this PR is a good change (I will approve).
I would prefer that we change the metric name though. Readable naming is as valuable for code as it is for external metrics. I know it's a breaking change, but I don't know of other way to improve the naming while avoiding the breakage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in #11703

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

@alamb
Copy link
Contributor Author

alamb commented Jul 26, 2024

Good plan -- how about we merge this PR (which is just code reorg) and then I'll make a follow on to propose renaming the public metric name for separate consideration

@findepi
Copy link
Member

findepi commented Jul 27, 2024

SGTM

@alamb alamb merged commit 75ced38 into apache:main Jul 29, 2024
25 checks passed
@alamb
Copy link
Contributor Author

alamb commented Jul 29, 2024

Filed #11703 with the proposed change to the metric name

@alamb alamb deleted the alamb/rename_field branch July 29, 2024 10:55
@alamb
Copy link
Contributor Author

alamb commented Jul 29, 2024

Thank you @findepi and @jonahgao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants