pig宏中的split工作吗?

wgx48brx  于 2021-06-21  发布在  Pig
关注(0)|答案(0)|浏览(256)

我明白了

Undefined alias: ZZ

此宏出错:

define chop (my, name, maxev) returns grouped, massive {
  gr = foreach (group $my by id) generate group as id, $name;
  split gr into
    massive if COUNT($name) > $maxev,
    ZZ otherwise;
  $grouped = ZZ;
  $massive = foreach massive generate id, COUNT($name) as $name;
};
A, massive = chop(A, 'abc', '$MAX_EVENTS');

当我尝试的时候

split gr into
    massive if COUNT($name) > $maxev,
    $grouped otherwise;

相反,我得到了

Macro 'chop' missing return alias: grouped

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题