abs(n)
acos(n)
asin(n)
atan(n)
ceil(n)
cos(n)
degrees(n)
exp(n)
floor(n)
log(m, n)
pi()
power(m, n)
radians(n)
round(n[, m])
sign(n)
sin(n)
sqrt(n)
tan(n)
trunc(n[, m])
Windowing Functions
coalesce
Previous Versions
Returns the value of n rounded to m decimal places. m can be negative, in which case the function returns n rounded to -m places to the left of the decimal point. If m is omitted, it returns n rounded to the nearest integer. For tie-breaking, it follows round half way from zero convention. n can be any real numeric value in the range of -1e308 <= n <= 1e308. m can be an integer value between -15 and 15, inclusive. This function can only be used in a foreach statement.
If the n value scale is lost on data upload, m can only work with the scale present in the dataset. It can’t add scale back to the value.
Note
1q = foreach q generate round(Price, 2) as Price;1round(-1.2345) = -11round(2.355, 2) = 2.361round(-3455.8, -1) = -34601round(2.35, 3) = 2.35