[
https://issues.apache.org/jira/browse/AVRO-4046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michel Hartmann updated AVRO-4046:
----------------------------------
Status: Patch Available (was: Open)
> [PHP] Values are overwritten by default value
> ---------------------------------------------
>
> Key: AVRO-4046
> URL: https://issues.apache.org/jira/browse/AVRO-4046
> Project: Apache Avro
> Issue Type: Bug
> Components: php
> Affects Versions: 1.12.0
> Reporter: Michel Hartmann
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When deserializing data, values are always overwritten if the Schema of the
> reader defines default values.
> Example:
> AVRO-Schema:
> {code:java}
> {
> "name": "RecordWithDefaultValue",
> "type": "record",
> "fields": [
> {
> "name": "field1",
> "type": "string",
> "default": "default"
> }
> ]
> } {code}
> AVRO-Data:
> {code:java}
> {"field1": "foobar"} {code}
> When de-serializing with the schema above as Reader-Schema the result is:
> {code:java}
> {"field1": "default"}{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)