Apache pig 代码块中的同步错误

Apache pig 代码块中的同步错误,apache-pig,Apache Pig,我遇到了这个无法解决的语法错误 grunt> describe x; x: {id: int,b: {(first: int,second: int)}} grunt> res = foreach x {f = FLATTEN(b); generate id,f;} 2013-07-22 12:28:53,050 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 11, column 21>

我遇到了这个无法解决的语法错误

grunt> describe x;
x: {id: int,b: {(first: int,second: int)}}

grunt> res = foreach x {f = FLATTEN(b); generate id,f;}
2013-07-22 12:28:53,050 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 11, column 21>  Syntax error, unexpected symbol at or near 'FLATTEN'
grunt>描述x;
x:{id:int,b:{(第一:int,第二:int)}
grunt>res=foreach x{f=flatte(b);生成id,f;}
2013-07-22 12:28:53050[main]错误org.apache.pig.tools.grunt.grunt-错误1200:语法错误,意外符号位于或接近“扁平化”
我该怎么做

嵌套块中只允许交叉、不同、筛选、FOREACH、LIMIT和ORDER BY

试一试

res = FOREACH x GENERATE id, FLATTEN(b.(first, second));