Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
The validate_internal function is not propagating schema's sub-namespaces resulting in validation error of valid values.
For example, it is not possible to set a value for the following schema even though it is a valid one.
The issue is that when Avro tries to validate the value for middle_field_2 it tries to resolve the reference inner_record_name using the top level namespace space.inner_record_name instead of middle_namespace.inner_record_name.
{
"name": "record_name",
"namespace": "space",
"type": "record",
"fields": [
{
"name": "outer_field_1",
"type": {
"type": "record",
"name": "middle_record_name",
"namespace": "middle_namespace",
"fields": [
{
"name": "middle_field_1",
"type": {
"type": "record",
"name": "inner_record_name",
"fields": [
{ "name": "inner_field_1", "type": "double" }
]
}
},
{ "name": "middle_field_2", "type": "inner_record_name" }
]
}
}
]
}
Attachments
Issue Links
- links to