Adds a new UDF, percent_change(x,y) which calculates the percent change between the two variables. While this is relatively easy to do in SQL, it also requires null and zero checks to prevent division by zero errors. This makes this calculation simpler.
DRILL-8433: Add Percent Change UDF to Drill
Description
Adds a new UDF,
percent_change(x,y)
which calculates the percent change between the two variables. While this is relatively easy to do in SQL, it also requires null and zero checks to prevent division by zero errors. This makes this calculation simpler.Documentation
See README.
Testing
Added unit tests.