Skip to content

Instantly share code, notes, and snippets.

@cstenac
Last active December 13, 2015 22:28
Show Gist options
  • Save cstenac/4984177 to your computer and use it in GitHub Desktop.
Save cstenac/4984177 to your computer and use it in GitHub Desktop.
Simple Hive UDF (1)
/** A simple UDF to convert Celcius to Fahrenheit */
public class ConvertToCelcius extends UDF {
public double evaluate(double value) {
return (value - 32) / 1.8;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment