Skip to content

Remove public statistical extensions for Iterable #1065

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
merged 3 commits into from
Feb 24, 2025

Conversation

AndreiKingsley
Copy link
Collaborator

Part of #961.

Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

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

thanks! just some small things. The TC build seems to fail, but I'm not sure why. Probably a rebuild fixes it

@@ -45,7 +45,7 @@ public fun AnyRow.rowMedianOrNull(): Any? =

public fun AnyRow.rowMedian(): Any = rowMedianOrNull().suggestIfNull("rowMedian")

public inline fun <reified T : Comparable<T>> AnyRow.rowMedianOfOrNull(): T? = valuesOf<T>().medianOrNull()
public inline fun <reified T : Comparable<T>> AnyRow.rowMedianOfOrNull(): T? = valuesOf<T>().median()
Copy link
Collaborator

Choose a reason for hiding this comment

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

why'd you change these? seems unsafe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because old medianOrNull() was removed. It called basically this median() - internal implementation, not public median (which was also removed).

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah then maybe you could rename median() to medianOrNull(), since that's what it does, right?

@@ -53,7 +53,7 @@ public fun AnyRow.rowPercentile(percentile: Double): Any =
rowPercentileOrNull(percentile).suggestIfNull("rowPercentile")

public inline fun <reified T : Comparable<T>> AnyRow.rowPercentileOfOrNull(percentile: Double): T? =
valuesOf<T>().percentileOrNull(percentile)
valuesOf<T>().percentile(percentile)
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

@Jolanrensen Jolanrensen merged commit 31401f6 into master Feb 24, 2025
6 checks passed
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.

2 participants