Skip to content
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

Support for default value of field #12

Open
jludvice opened this issue Dec 19, 2017 · 2 comments
Open

Support for default value of field #12

jludvice opened this issue Dec 19, 2017 · 2 comments
Assignees

Comments

@jludvice
Copy link

jludvice commented Dec 19, 2017

One can define default value in *.asvc.

"fields": [
     {
      "name": "someNullableString",
      "type": [
        "null",
        "string"
      ],
      "default": null
    },
    {
      "name": "someNullableLong",
      "type": [
        "long",
        "null"
      ],
      "default": 0
    },
]

It would be nice to support this in the ui.

Also note https://issues.apache.org/jira/browse/AVRO-1057 -> default value should match first entry of type

@timbault
Copy link
Contributor

Yes you're right. This project is still in progress and some features are not yet implemented. It is the case of the default values.
I am looking to add this feature.

@timbault timbault self-assigned this Dec 20, 2017
@timbault
Copy link
Contributor

I have pushed a partial support for default value of field.
Supported default value are:

  • primitive types (except bytes)
  • array of primitive types
  • map of primitive types
  • record with fields of primitive types
  • enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants