Skip to content

Instantly share code, notes, and snippets.

@alaiacano
Created May 23, 2015 12:31
Show Gist options
  • Save alaiacano/3d463d68acd8d985f7fb to your computer and use it in GitHub Desktop.
Save alaiacano/3d463d68acd8d985f7fb to your computer and use it in GitHub Desktop.
example of a complex avro union
record FirstType {
union { null, int } field1 = null;
union { null, int } field2 = null;
}
record SecondType {
union { null, long } someOtherField = null;
}
record MyAvroObjec {
/** This is fine */
union { null, FirstType } notAComplexUnion = null;
/** Spark can't load this */
union { null, FirstType, SecondType } complexUnion = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment