拆分工作在猪宏中吗?

时间:2014-07-17 16:02:46

标签: macros apache-pig

我得到了

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

0 个答案:

没有答案