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

Port UDFs to Java #52

Merged
merged 2 commits into from
May 23, 2016

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