ROUND(expression)
$ nano mathround.txt
检查插入到文本文件中的值。
$ cat mathround.txt
上传特定目录下 HDFS 上的文本文件。
$ hdfs dfs-put mathround.txt /pigexample
$ pig
grunt> A = LOAD '/pigexample/mathround.txt' AS (a1:float) ;
grunt> DUMP A;
让我们返回向上取整的值。
grunt> Result = FOREACH A GENERATE ROUND(a1); grunt> DUMP Result;
