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

AVRO-XXXX: Given array example in the documentation is incorrect #2192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pkonopacki1
Copy link

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:)

  • Extended interop tests to verify consistent valid schema names between SDKs
  • Added test that validates that Java throws an AvroRuntimeException on invalid binary data
  • Manually verified the change by building the website and checking the new redirect

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Comment on lines 137 to 143
```json
{
"type": "array",
"items" : "string",
"default": []
}
"items" : "string"
},
"default": []
```
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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).

Copy link
Author

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

Copy link
Contributor

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"?

Comment on lines 137 to 143
```json
{
"type": "array",
"items" : "string",
"default": []
}
"items" : "string"
},
"default": []
```
Copy link
Contributor

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).

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

Successfully merging this pull request may close these issues.

4 participants