Andrew Olson created CRUNCH-667:

             Summary: Documentation should mention that cogrouping requires a 
common type family
                 Key: CRUNCH-667
             Project: Crunch
          Issue Type: Improvement
          Components: Core
            Reporter: Andrew Olson
            Assignee: Josh Wills

Attempting to cogroup an Avro-based table with a Writable-based table produces 
an exception like:

java.lang.ClassCastException: org.apache.crunch.types.writable.WritableType 
cannot be cast to org.apache.crunch.types.avro.AvroType
at org.apache.crunch.types.avro.Avros.collections(
at org.apache.crunch.lib.Cogroup.cogroup(
at org.apache.crunch.lib.Cogroup.cogroup(

This technical limitation makes sense, and the exception message is relatively 
self-explanatory (at least for anyone who is familiar with Crunch concepts), so 
I don't think there's really a bug to be fixed. However both the documentation 
in the code javadoc (Cogroup class, Set#difference, and PTable#cogroup) and the 
user guide section about Cogroups 
( could be updated to 
clarify that all tables involved in a cogroup operation must have the same type 

This message was sent by Atlassian JIRA

Reply via email to