-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AVRO-XXXX: Given array example in the documentation is incorrect #2192
base: main
Are you sure you want to change the base?
Conversation
```json | ||
{ | ||
"type": "array", | ||
"items" : "string", | ||
"default": [] | ||
} | ||
"items" : "string" | ||
}, | ||
"default": [] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right either. If there is a JSON property with name "default"
and value []
, then the previous schema object { "type": array", "items": "string" }
should also be a value of a property, and the name of that property should be shown.
I think it would be best to just delete "default": []
from this example, and also from the example under "Maps". The "default" property is meaningful in fields and enum schemas but not in other schemas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree: the example now shows a json value and a name-value pair. These can never occur together and thus look odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @KalleOlaviNiemitalo ! We should take this out of Arrays (and Maps as well, in the next section).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this still can be used as an optional field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding an example of "default" under "Records"?
```json | ||
{ | ||
"type": "array", | ||
"items" : "string", | ||
"default": [] | ||
} | ||
"items" : "string" | ||
}, | ||
"default": [] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @KalleOlaviNiemitalo ! We should take this out of Arrays (and Maps as well, in the next section).
What is the purpose of the change
(For example: This pull request improves file read performance by buffering data, fixing AVRO-XXXX.)
Verifying this change
(Please pick one of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation