You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by xarx xarx <xa...@zoznam.sk> on 2021/02/13 17:01:25 UTC
Aliases for primitive types
Hello,
I want to define aliases/logical names for primitive types:
protocol Test {
string PartyId;
record Header {
PartyId partyId;
}
}
Is that possible in IDL or AVRO Schema language? Avro-Tools do not accept
this. As a work-around, I can define:
record PartyId {
string _value;
}
Though binary this seems equivalent, semantically (e.g. in generated Java
code) this is not the same.
Custom names can be defined for enums and records, but it seems to me that
AVRO doesn't offer mea ns for aliasing primitive types.
Thank you,
Martin.