我正在尝试生成数据集中列出的演出(double)
的AVG()。我收到一个ERROR 1066: Unable to open iterator for alias TEST
异常,我认为这是因为TEST为空且无法迭代。
码
flat_bus = FOREACH buss GENERATE near, name, FLATTEN(categories) AS category, stars;
bus_grouped = GROUP flat_bus BY category;
category_avg = FOREACH bus_grouped GENERATE group as grp, AVG(bus_grouped.stars);
TEST = LIMIT category_avg 10;
DUMP TEST;
答案 0 :(得分:1)
应该从flat_bus获得明星
category_avg = FOREACH bus_grouped GENERATE group as grp, AVG(flat_bus.stars);