Skip to content

Port UDFs to Java#52

Merged
holdenk merged 2 commits intohigh-performance-spark:masterfrom
mahmoudhanafy:port-UDF-to-java
May 23, 2016
Merged

Port UDFs to Java#52
holdenk merged 2 commits intohigh-performance-spark:masterfrom
mahmoudhanafy:port-UDF-to-java

Conversation

@mahmoudhanafy
Copy link
Contributor

@mahmoudhanafy mahmoudhanafy commented May 23, 2016

#47


@Override
public Object evaluate(Row buffer) {
return Math.pow(buffer.getDouble(1), 1.0 / buffer.getLong(0));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just convert the original code to Java, but I don't understand this.
I think (sum ^ (1/count)) != average

Copy link
Member

Choose a reason for hiding this comment

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

oh yah, seems like the original UDF was misnamed. Lets fix that.

@holdenk holdenk merged commit 98cdc48 into high-performance-spark:master May 23, 2016
@mahmoudhanafy mahmoudhanafy deleted the port-UDF-to-java branch May 25, 2016 05:36
rachelwarren pushed a commit that referenced this pull request Jan 3, 2019
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