Incorrect Schema computation for python UDFs.
---------------------------------------------

                 Key: PIG-1679
                 URL: https://issues.apache.org/jira/browse/PIG-1679
             Project: Pig
          Issue Type: Bug
            Reporter: Ashutosh Chauhan


{code}
$ cat test.py
#collectBag- collect elements of a bag into other bag
@outputSchema("bag:{(y:{t:(word:chararray)}}")
def collectBag(bag):
  outBag = []
  for word in bag:
    tup=(len(bag), word[1])
    outBag.append(tup)
  return outBag

$ cat test.pig

register 'test.py' using jython as myfuncs;                      
A = load 'test.txt';
B = foreach A generate myfuncs.collectBag(x);                    
describe B;                                                      

-- B: {bytearray}

{code}

Correct behavior is either get me the correct schema (if schema string is 
correct) or throw ParseException and tell user that schema string is incorrect. 
Schema getting evaluated to bytearray is incorrect behavior.

-- 
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