When a grouping key is specified, the data must be grouped by this key before the aggregation can be computed, as illustrated in figure 13.
指定了分组关键词后,必须在完成聚合计算之前,依据这一关键词对数据进行分组,如图 13 所示。
If more than one column is aggregated using the same grouping key or without a grouping key, then all the aggregations are computed within the same operation with a single pass over the data.
如果利用相同的分组关键字或者没有分组关键字,来聚合多个列,那么,所有的聚合都在单个数据传递中的相同操作中进行。
Note that it is easy to get a list of all the grouping-key values (region names in this example) without setting up grouping; just use the new distinct-values function.
要注意,不需要建立分组就能很容易得到所有grouping - key值(该例中为区域名称)的列表,只要使用新的distinct - values函数即可。
应用推荐