[
https://issues.apache.org/jira/browse/NIFI-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16316539#comment-16316539
]
ASF GitHub Bot commented on NIFI-3504:
--------------------------------------
Github user apsaltis closed the pull request at:
https://github.com/apache/nifi/pull/1520
> TransformCSVToAvro and TransformAvroToCSV incorrectly handle logicalTypes
> -------------------------------------------------------------------------
>
> Key: NIFI-3504
> URL: https://issues.apache.org/jira/browse/NIFI-3504
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.2.0
> Reporter: Andrew Psaltis
> Assignee: Andrew Psaltis
>
> The current implementation of the encoding and decoding of Avro logicalTypes
> is inconsistent with the Avro 1.7.7 and 1.8.1 specifications. Currently it is
> assumed that a logical type always has the underlying Avro type of Byte.
> However, that is not consistent with the following text, emphasis mine that
> was extracted from the logical types section of the [Avro
> specification|http://avro.apache.org/docs/1.7.7/spec.html#Logical+Types].
> {quote}
> A logical type *is always serialized using its underlying Avro type* so that
> values are encoded in exactly the same way as the equivalent Avro type that
> does not have a logicalType attribute. Language implementations may choose to
> represent logical types with an appropriate native type, although this is not
> required.
> Language implementations *must ignore unknown logical types when reading, and
> should use the underlying Avro type. If a logical type is invalid, for
> example a decimal with scale greater than its precision, then implementations
> should ignore the logical type and use the underlying Avro type.*
> {quote}
> [1]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)