apache / apache/parquet-java

Error in reading a list type data in hive which was generated through pig

未关闭
#1,490 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Component: Java Component: Parquet Priority: Major Type: bug
主要语言
Java
星标
3.1k
派生
1.6k
平均合并
3 天 12 小时
30 天内合并 PR
33

描述

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.*

贡献指南

这个仓库没有索引到贡献指南

调研方向

先从 Parquet-Hive 绑定中的 ArrayWritableGroupConverter 和 PigSchemaConverter 开始,然后使用报告中的 Requestlist schema 和 DataWritableGroupConverter snippet 重现该问题。跟踪生成的列表 schema,并将其与 converter 对一个或两个字段的预期进行对照;完成标准是生成的 schema 可以在不出现此转换错误的情况下读取。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
data-engineering
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。