You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Richard Ding (JIRA)" <ji...@apache.org> on 2013/12/04 21:04:35 UTC

[jira] [Created] (PIG-3609) ClassCastException when calling compareTo method on AvroBagWrapper 

Richard Ding created PIG-3609:
---------------------------------

             Summary: ClassCastException when calling compareTo method on AvroBagWrapper 
                 Key: PIG-3609
                 URL: https://issues.apache.org/jira/browse/PIG-3609
             Project: Pig
          Issue Type: Bug
          Components: impl
    Affects Versions: 0.12.0
            Reporter: Richard Ding
            Priority: Minor


One got the following exception when calling compareTo method on AvroBagWrapper with an AvroBagWrapper object:

{code}
java.lang.ClassCastException: org.apache.pig.impl.util.avro.AvroBagWrapper incompatible with java.util.Collection
        at org.apache.avro.generic.GenericData.compare(GenericData.java:786)
        at org.apache.avro.generic.GenericData.compare(GenericData.java:760)
        at org.apache.pig.impl.util.avro.AvroBagWrapper.compareTo(AvroBagWrapper.java:78)
{code}

Looking at the code, it compares objects with different types:

{code}
return GenericData.get().compare(theArray, o, theArray.getSchema());
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)