Skip to content

Union types should allow "null" in any position #39

@chupaty

Description

@chupaty

Using the following schema:

{
    "type": "record",
    "name": "test",
    "fields": [
        {"name": "a", "type": ["long","null"] }
    ]
}

rsgen-avro errors with:

Templating error: Invalid Schema::Null not in first position on an UnionSchema variants

I don't see a requirement in the avro spec about this (we do have additional requirements when we have a default value, but this doesn't apply here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions