Error in reading a list type data in hive which was generated through pig
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.6k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 33
Description
ArrayWritableGroupConverter in Parquet-Hive binding expects that any array field contains either 1 or 2 fields. However, the schema which PigSchemaConverter generates, doesn't honour this condition. It can be reproduced through following code
```
MessageType messageType = new PigSchemaConverter().convert(ThriftToPig.toSchema(Requestlist.class));
DataWritableGroupConverter converter = new DataWritableGroupConverter(messageType, messageType);
```
Requestlist is a thrift class
```
struct Request {
1: required string id,
2: i64 time,
3: required string source
}
struct Requestlist {
1: optional list requests
}
```
**Environment**: Parquet-Pig - 1.3.2
Hive - 0.13.1
Elephant-Bird - 4.4
**Reporter**: [Abhishek Agarwal](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=abhishek.agarwal) / @abhishekagarwal87
**Note**: *This issue was originally created as [PARQUET-53](https://issues.apache.org/jira/browse/PARQUET-53). 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 ArrayWritableGroupConverter in the Parquet-Hive binding and PigSchemaConverter, then reproduce the issue using the Requestlist schema and DataWritableGroupConverter snippet from the report. Trace the generated list schema against the converter's one- or two-field expectation; done means the generated schema can be read without this conversion error.
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