Created
May 23, 2015 12:31
-
-
Save alaiacano/3d463d68acd8d985f7fb to your computer and use it in GitHub Desktop.
example of a complex avro union
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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