validate type as soon as each line of script is entered in grunt shell
----------------------------------------------------------------------

                 Key: PIG-1687
                 URL: https://issues.apache.org/jira/browse/PIG-1687
             Project: Pig
          Issue Type: Improvement
    Affects Versions: 0.8.0
            Reporter: Thejas M Nair
             Fix For: 0.9.0


In interactive mode (grunt shell), the type validation should be done as soon 
as a line of script is added .
For example -
{code}
grunt> l = load 'x' as (a : chararray, b : int);
-- no error when following statement is typed
grunt> f = foreach l generate a + b;   

-- errors only when explain/describe/dump/store is called 
grunt> describe f; 
2010-10-21 15:46:09,137 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
1039: In alias f, incompatible types in Add Operator left hand side:chararray 
right hand side:int
Details at logfile: /Users/tejas/pig_comb/trunk/pig_1287700533547.log

{code}

Another example-
{code}
grunt> l = load 'x' as (a : chararray, b : int);
grunt> f = foreach l generate CONCAT(a,b);
grunt> describe f; 
2010-10-21 15:46:51,477 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
1045: Could not infer the matching function for org.apache.pig.builtin.CONCAT 
as multiple or none of them fit. Please use an explicit cast.

{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to