hive,order by ,distribute by ,sort by ,cluster by 区别,作用,用法

0 order by 是全局有序。sort by是在一个reduce中排序,该reduce的输出有序,是局部有序。distriute by c1 是作用于map输出的结果,把c1的值相同的记录输入到同一个reduce中;如果reduce数目比较少,c1多个不同值的记录会输入到同一个reduce中。 1 distribute by要写在sort by前面,不然报错 2 distribute by c
相关文章
相关标签/搜索