Koji Noguchi created PIG-5333:
---------------------------------
Summary: LoadCaster sometimes not set for complex type
Key: PIG-5333
URL: https://issues.apache.org/jira/browse/PIG-5333
Project: Pig
Issue Type: Bug
Reporter: Koji Noguchi
Assignee: Koji Noguchi
TypeCasting a bytearray field in the nested foreach below
{code}
A = load 'input.txt' as (a0:bytearray, a1:bytearray);
B = group A by (a0,a1);
C = FOREACH B GENERATE SIZE(A) as sizeofgroup, A;
SPLIT C into D if sizeofgroup > 2, Z OTHERWISE;
F = FOREACH D {
F1 = FOREACH A generate (chararray) a0;
GENERATE F1;
}
store F into '/tmp/output/F';
store Z into '/tmp/output/Z';
{code}
Fails with
{noformat}
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1075:
Received a bytearray from the UDF or Union from two different Loaders. Cannot
determine how to convert the bytearray to string for [a0[7,29]]
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNextString(POCast.java:1126)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)