-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AVRO-4033: [C++] Filter out redundant union classes generated by avro…
…gencpp (#3088) * AVRO-4033: [C++] Filter out redundant union classes generated by avrogencpp. For a unique list of union branches only one class will be generated. This can reduce the header size in schemas with many unions. * AVRO-4033: [C++] Align parameter names for UnionCodeTracker::setTraitsGenerated to be more consistent (#3088) --------- Co-authored-by: hwse <[email protected]>
- Loading branch information
Showing
4 changed files
with
187 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"type": "record", | ||
"name": "RedundantUnionSchema", | ||
"doc": "Schema to test the generation of redundant union types in avrogencpp", | ||
"fields" : [ | ||
{"name": "null_string_1", "type": ["null", "string"]}, | ||
{"name": "null_string_2", "type": ["null", "string"]}, | ||
{"name": "string_null_1", "type": ["string", "null"]}, | ||
{"name": "string_null_2", "type": ["string", "null"]}, | ||
{"name": "null_string_int", "type": ["string", "null", "int"]}, | ||
{"name": "null_Empty_1", "type": ["null", {"type": "record", "name": "Empty", "fields": []}]}, | ||
{"name": "null_Empty_2", "type": ["null", "Empty"]}, | ||
{"name": "null_namespace_record_1", "type": ["null", {"type": "record", "namespace": "example_namespace", "name": "Record", "fields": []}]}, | ||
{"name": "null_namespace_record_2", "type": ["null", "example_namespace.Record"]}, | ||
{"name": "null_fixed_8", "type": ["null", {"type": "fixed", "size": 8, "name": "fixed_8"}]}, | ||
{"name": "null_fixed_16", "type": ["null", {"type": "fixed", "size": 16, "name": "fixed_16"}]}, | ||
{"name": "fixed_8_fixed_16", "type": ["fixed_8", "fixed_16"]}, | ||
{"name": "null_int_map_1", "type": ["null", {"type": "map", "values": "int"}]}, | ||
{"name": "null_int_map_2", "type": ["null", {"type": "map", "values": "int"}]}, | ||
{"name": "null_long_map", "type": ["null", {"type": "map", "values": "long"}]} | ||
] | ||
} |
This file contains 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