[ 
https://issues.apache.org/jira/browse/AVRO-1962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239806#comment-16239806
 ] 

Tyler Harden commented on AVRO-1962:
------------------------------------

To both [~Yibing] and [~xiongtx] - According to both the 1.8.1 and 1.8.2 
documentation for the Avro specification:
* https://avro.apache.org/docs/1.8.1/spec.html#Logical+Types
* https://avro.apache.org/docs/1.8.2/spec.html#Logical+Types
* 
There is not any explicit support for "UUID" as an underlying logical type for 
string fields. However, when you look at the Avro source code for logical types:
* 
https://github.com/apache/avro/blob/17f2d75132021fafeca29edbdcade40df960fdc9/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
There is support for UUID.

The docs do not line up with the source code, which is extremely confusing 
given the barrage of issues surrounding this across the JIRA board. 
Additionally, is a string type even the most logical storage medium? As opposed 
to a fixed type at 128 bytes?

> Support UUID logical type
> -------------------------
>
>                 Key: AVRO-1962
>                 URL: https://issues.apache.org/jira/browse/AVRO-1962
>             Project: Avro
>          Issue Type: Bug
>    Affects Versions: 1.8.1
>            Reporter: Tianxiang Xiong
>
> The AVRO-1554 ticket seems to suggest that the issue of representing UUIDs is 
> resolved with [logical 
> types|http://avro.apache.org/docs/1.8.1/spec.html#Logical+Types] in Avro
> 1.8.1. However, there is [no UUID logical type in Avro 
> 1.8.1|https://github.com/apache/avro/blob/release-1.8.1/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj#L214-L244].
> The specification offers several examples of using logical types; decimals
> are represented as:
> {code}
> {
>   "type": "bytes",
>   "logicalType": "decimal",
>   "precision": 4,
>   "scale": 2
> }
> {code}
> No examples for UUID are offered, presumably because UUIDs are not supported.
> Thanks to [~Yibing]'s confirmation on the mailing list that this is the case.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to