-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LogicalType does not get ingested into the schema when using Type.forSchema() #493
Comments
Hi @jtmarks6. By default |
Hi, maybe there is a bug? The following: const type = avro.Type.forSchema(
{
namespace: 'ns',
type: 'record',
name: 'foo',
version: 1,
fields: [
{
name: 'bar',
type: { type: 'long', logicalType: 'local-timestamp-millis' },
},
],
},
);
console.log(type.schema({ exportAttrs: true })); produces {
name: 'ns.foo',
type: 'record',
fields: [ { name: 'bar', type: 'long' } ]
} |
@urugator - this is WAI, actually. I forgot to mention that the logical type must be used. Here there are no constructors passed in when parsing the schema, so the |
I see, thank you. To elaborate a bit, I attempted to use @kafka/confluent-schema-registry to obtain the original schema from registry, but unfortunately it returns directly the |
I am trying to load a schema that has a timestamp field that uses logicalType: 'timestamp-millis' and can not get the logicalType to stay in the schema when loaded.
Here is a test case I wrote in my repo to show the issue:
type.schema() outputs this schema:
The text was updated successfully, but these errors were encountered: