apache / apache/parquet-java

Thrift binary fields are not serialized correctly

Open
#1,416 0 comments 0 reactions 0 assignees View on GitHub
Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

Thrift binary fields are not serialized correctly - I believe UTF-8 encoding is applied.

A demonstration of this bug is shown in https://github.com/laurencer/parquet-mr-bug

This appears to be an issue in Parquet-MR where Thrift TType is used determine the type of fields. TType actually represents the on-disk/encoded field type tag - that does not distinguish between binary and string fields.

String data is not actually represented on-disk as being different - instead it is up to the program to interpret the binary data as a UTF-8 encoded string. Parquet-MR instead assumes that every binary field is a UTF-8 encoded string.

This may have arisen because the binary field tag is actually TType.String (where it actually just represents a raw binary field).

**Reporter**: [Laurence Rouesnel](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=laurencer)

**Note**: *This issue was originally created as [PARQUET-158](https://issues.apache.org/jira/browse/PARQUET-158). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.