You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Shubham Chopra <sh...@gmail.com> on 2011/06/17 18:12:53 UTC

pig-0.8.1, pig-0.9 and pig-trunk

Hi,

I am trying this script on 3 different versions of pig, 0.8.1, 0.9 and the
trunk.

a = load 'a' using PigStorage('|') as (x:int, y:int, z:int);
b = group a by (x, 'test' as test_col:chararray, y);

An input file named 'a' contains the following data:
1|2|3
3||4

Pig - 0.8.1 : is accepted by the pig parser

Pig - 0.9 :
grunt> a = load 'a' using PigStorage('|') as (x:int, y:int, z:int);
grunt> b = group a by (x, 'test' as test_col:chararray, y);
2011-06-17 11:58:01,650 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <line 2, column 16>  Syntax error, unexpected symbol at or near
'x'
grunt> b = group a by (x, 'test' as test_col, y);
2011-06-17 11:59:58,803 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <line 2, column 16>  Syntax error, unexpected symbol at or near
'x'
grunt> b = group a by (x, 'test', y);
- doesnot throw an error.

Pig - trunk:
grunt> a = load 'a' using PigStorage('|') as (x:int, y:int, z:int);
2011-06-17 11:58:40,453 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <line 1, column 29>  mismatched input '(' expecting SEMI_COLON

Does anyone know if there is there any change in schema semantics?

Thanks,
Shubham.