Thrift binary fields are not serialized correctly
- 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
Research direction
Start with the linked parquet-mr-bug demonstration and trace Parquet-MR's handling of Thrift TType.String for binary fields. Confirm where binary data is interpreted as UTF-8 and compare that path with string fields. Done means raw binary fields serialize and deserialize without UTF-8 interpretation while string fields retain their expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100