且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

猪相当于 SQL GREATEST/LEAST?

更新时间:2022-04-21 05:12:19

事实证明,存在有效的内联"基于袋子的方法:

It turns out that there are "inline" bag-based approaches that work:

x = LOAD 'file:///a/b/c.csv' USING PigStorage() AS (a: int, b: int, c: int);
y = FOREACH x GENERATE a AS a: int, b AS b: int, c AS c: int, MAX(TOBAG(a, b, c)) AS g: int;