KalleOlaviNiemitalo commented on code in PR #1826:
URL: https://github.com/apache/avro/pull/1826#discussion_r944507324
##########
lang/c++/test/unittest.cc:
##########
@@ -452,7 +457,14 @@ struct TestSchema {
customAttributes);
std::string expectedJsonWithCustomAttribute =
"{\"type\": \"record\", \"name\": \"Test\",\"fields\": "
- "[{\"name\": \"f1\", \"type\": \"long\",\"extra field\": \"1\"}]}";
+ "[{\"name\": \"f1\", \"type\": \"long\", "
+ "\"arrayField\": \"[1]\", "
+ "\"booleanField\": \"true\", "
+ "\"mapField\": \"{\\\"key1\\\":\\\"value1\\\",
\\\"key2\\\":\\\"value2\\\"}\", "
+ "\"nullField\": \"null\", "
+ "\"numberField\": \"1.23\", "
+ "\"stringField\": \"\\\"field value with \\\"double quotes\\\"\\\"\""
Review Comment:
In an Avro schema file, must all custom attributes of fields have string
values? I.e. is this invalid:
```JSON
{
"type": "record",
"name": "Demo",
"fields": [
{
"name": "field",
"type": "string",
"custom_flag": true
}
]
}
```
If this schema is not invalid, then is the Avro C++ library able to load it
from a file and then write it to another file, preserving the custom attribute?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]