Skip to content

Commit

Permalink
PARQUET-1125: Add UUID logical type.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Oct 7, 2017
1 parent 7cc29f7 commit 00a80bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion LogicalTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,18 @@ was converted from an enumerated type in another data model (e.g. Thrift, Avro,
Applications using a data model lacking a native enum type should interpret `ENUM`
annotated field as a UTF-8 encoded string.

The sort order used for `ENUM`s is `UNSIGNED` byte-wise comparison.
The sort order used for `ENUM` values is unsigned byte-wise comparison.

### UUID

`UUID` annotates a 16-byte fixed-length binary. The value is encoded using
big-endian, so that `00112233-4455-6677-8899-aabbccddeeff` is encoded as the
bytes `00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff`
(This example is from [wikipedia's UUID page][wiki-uuid]).

The sort order used for `ENUM` values is unsigned byte-wise comparison.

[wiki-uuid]: https://en.wikipedia.org/wiki/Universally_unique_identifier

## Numeric Types

Expand Down
1 change: 1 addition & 0 deletions src/main/thrift/parquet.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ struct Statistics {

/** Empty structs to use as logical type annotations */
struct StringType {} // allowed for BINARY, must be encoded with UTF-8
struct UUIDType {} // allowed for FIXED[16], must encoded raw UUID bytes
struct MapType {} // see LogicalTypes.md
struct ListType {} // see LogicalTypes.md
struct EnumType {} // allowed for BINARY, must be encoded with UTF-8
Expand Down

0 comments on commit 00a80bf

Please sign in to comment.