ProtoRecordConverter might wrongly cast a Message.Builder to Message
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.6k
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 33
描述
ProtoRecordConverter returns current record as follows:
```Java
public T getCurrentRecord() {
if (buildBefore) {
return (T) this.reusedBuilder.build();
} else {
return (T) this.reusedBuilder;
}
}
```
However this might fail if T is subclass of Message and buildBefore == false, since it's actually casting a Message.Builder instance to Message type.
**Reporter**: [Wu Xiang](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=wxiang7)
**Assignee**: [Reuben Kuhnert](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sircodesalot) / @sircodesalotOfTheRound
**Note**: *This issue was originally created as [PARQUET-388](https://issues.apache.org/jira/browse/PARQUET-388). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 ProtoRecordConverter#getCurrentRecord 开始,检查 issue 中描述的 reusedBuilder 和 buildBefore 路径。复现当前记录类型是 Message 子类且 buildBefore 为 false 的情况,然后验证返回值具有预期的 Message 类型,且不会发生类型转换失败。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- data-engineering
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100