You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.
It would be really nice to be able to read in avro maps and arrays (possibly with other nested maps and arrays) and also write them out.
I'm happy to help with this but my initial tries at modifying the project with this support (using cascading.kryo for the serialization) has given me cast errors from List to Comparable. Taking away the Avro part and just using cascading.kryo and TextLine works fine however.
For array I would try adding something like the following to the toAvro() method:
case ARRAY:
GenericData.Array avroArray = new GenericData.Array(((List)val).size(), typeInfo.schema);
avroArray.addAll((List)val);
return avroArray;
and do similar for map. It may be the case that an examination of each element of the list or value set of the map is needed in order to also call toAvro() on them but that's pretty easy to do.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It would be really nice to be able to read in avro maps and arrays (possibly with other nested maps and arrays) and also write them out.
I'm happy to help with this but my initial tries at modifying the project with this support (using cascading.kryo for the serialization) has given me cast errors from List to Comparable. Taking away the Avro part and just using cascading.kryo and TextLine works fine however.
For array I would try adding something like the following to the toAvro() method:
case ARRAY:
GenericData.Array avroArray = new GenericData.Array(((List)val).size(), typeInfo.schema);
avroArray.addAll((List)val);
return avroArray;
and do similar for map. It may be the case that an examination of each element of the list or value set of the map is needed in order to also call toAvro() on them but that's pretty easy to do.
The text was updated successfully, but these errors were encountered: