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
This allows us to define one fixed standard for decimal precision and scale across multiple records as we build our library of company known types.
Unfortunately, avrohugger does not yet have support for top level types. I'm not sure how to best represent that, but my guess right now would be to define them as a scala type - ie if avrohugger sees the top level avro schema above, it would generate something like the following:
package com.company.namespace
type CustomDecimal = BigDecimal
The text was updated successfully, but these errors were encountered:
zhoekstra
changed the title
Support for referenced fixed custom types
Support for top level type definitions
Nov 21, 2018
Currently avrohugger generates records and enums as top-level definitions, but doesn't yet support fixed types, nor type aliases. Those sound useful to add eventually, or I'd be open to reviewing a PR, but my queue is pretty full these days, so the features are likely a ways off.
Our company has a set of defined avro schemas which we're trying to use avrohugger on.
In these avro schemas, they have defined a top-level schema for fixed decimals:
This type is then referenced throughout other avro schemas like so:
This allows us to define one fixed standard for decimal precision and scale across multiple records as we build our library of company known types.
Unfortunately, avrohugger does not yet have support for top level types. I'm not sure how to best represent that, but my guess right now would be to define them as a scala type - ie if avrohugger sees the top level avro schema above, it would generate something like the following:
The text was updated successfully, but these errors were encountered: