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

Add randLaplace and native randGamma #156

Merged
merged 4 commits into from
Sep 22, 2024
Merged

Conversation

zeotuan
Copy link
Collaborator

@zeotuan zeotuan commented Sep 19, 2024

Part of #155

@zeotuan zeotuan marked this pull request as ready for review September 22, 2024 05:21
@zeotuan zeotuan requested a review from MrPowers September 22, 2024 05:21
object functions {
private def withExpr(expr: Expression): Column = Column(expr)

def randGamma(seed: Long, shape: Double, scale: Double): Column = withExpr(RandGamma(seed, shape, scale)).alias("gamma_random")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

randGamma must be here since Column.apply is only available to e org.apache.spark.sql

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@MrPowers what do you think about this naming? I am thinking maybe we could also make it
org.apache.spark.sql.daria.math or
making it available again in com.github.mrpowers.spark.daria.sql.functions

Copy link
Collaborator

Choose a reason for hiding this comment

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

@zeotuan - I think com.github.mrpowers.spark.daria.sql.functions is fine!

@zeotuan zeotuan changed the title Add native RandGamma AddrandLaplace and native randGamma Sep 22, 2024
@zeotuan zeotuan changed the title AddrandLaplace and native randGamma Add randLaplace and native randGamma Sep 22, 2024
@zeotuan zeotuan requested a review from alfonsorr September 22, 2024 06:24
Copy link
Collaborator

@MrPowers MrPowers left a comment

Choose a reason for hiding this comment

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

LGTM!

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