Skip to content

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

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?


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