现在,我们可从当前分组(或一个新开始的分组)中获得聚集信息,并将分组信息和传递给 UDF 的参数结合起来。
Now we get the aggregation information for the current group (or start a new group) and combine that group information with the parameters that were passed in to the UDF.
这是将分组信息编码到二进制串中的缘故,分组参数类型为VARCHAR,比简单的INTEGER类型潜在地要求更多的存储空间。
This is due to the encoding of the group information in the binary string, and a grouping parameter of type VARCHAR requires potentially more space than a simple INTEGER value.
如果利用相同的分组关键字或者没有分组关键字,来聚合多个列,那么,所有的聚合都在单个数据传递中的相同操作中进行。
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.
应用推荐