[ 
https://issues.apache.org/jira/browse/PIG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koji Noguchi updated PIG-3293:
------------------------------

    Attachment: pig-3293-test-only-v01.patch

bq. Must be the "caster" in D's POCast is null. Can you attach MyLoader?

Attaching a test case using  
{noformat}
   public class PigStorageWithStatistics extends PigStorage {
{noformat}
from org.apache.pig.test.  Even though both PigStorage and 
PigStorageWithStatistics returns Utf8StorageConverter, testcase fails with 
"Cannot determine how to convert the
bytearray to string."

Note that I created PIG-3295 for dealing with the case when casting fails even 
when union comes from the same loader.

Figuring out if the loaders were same was easy with calling 'equals' for the 
FuncSpec instances.  I don't know how to achieve this easily for comparing 
casters.

                
> Casting fails after Union from two data sources&loaders
> -------------------------------------------------------
>
>                 Key: PIG-3293
>                 URL: https://issues.apache.org/jira/browse/PIG-3293
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Koji Noguchi
>            Priority: Minor
>         Attachments: pig-3293-test-only-v01.patch
>
>
> Script similar to 
> {noformat}
> A = load 'data1' using MyLoader() as (a:bytearray);
> B = load 'data2' as (a:bytearray);
> C = union onschema A,B;
> D = foreach C generate (chararray)a;
> Store D into './out';
> {noformat}
> fails with 
>    java.lang.Exception: org.apache.pig.backend.executionengine.ExecException: 
> ERROR 1075: Received a bytearray from the UDF. Cannot determine how to 
> convert the bytearray to string.
> Both MyLoader and PigStorage use the default Utf8StorageConverter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to