apache / apache/parquet-java

GroupType.union(Type toMerge, boolean strict) does not honor strict parameter

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

描述

This is the code as it currently stands in master:

```Java
@Override
protected Type union(Type toMerge, boolean strict) {
if (toMerge.isPrimitive()) {
throw new IncompatibleSchemaModificationException("can not merge primitive type " + toMerge + " into group type " + this);
}
return new GroupType(toMerge.getRepetition(), getName(), mergeFields(toMerge.asGroupType()));
}
```

Note the call to `mergeFields` omits the `strict` parameter. I believe the code should be:

```Java
@Override
protected Type union(Type toMerge, boolean strict) {
if (toMerge.isPrimitive()) {
throw new IncompatibleSchemaModificationException("can not merge primitive type " + toMerge + " into group type " + this);
}
return new GroupType(toMerge.getRepetition(), getName(), mergeFields(toMerge.asGroupType(), strict));
}
```

Note the call to `mergeFields` includes the `strict` parameter.

I would work on this myself, but I'm having considerable trouble working with the codebase (see e.g. http://stackoverflow.com/questions/31229445/build-failure-apache-parquet-mr-source-mvn-install-failure). Given the (assumed) simplicity of the fix, can a seasoned Parquet contributor take this up? Cheers.

**Reporter**: [Michael MacFadden](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael) / @mallman

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

贡献指南

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

调研方向

在 Parquet Java 代码库中搜索 GroupType.union(Type toMerge, boolean strict),然后检查该方法如何调用 mergeFields。确认 strict 值是否如描述的那样被传递,并运行相关的项目测试,以验证 strict 和非 strict 模式下的 schema 合并行为。

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

评估

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

把新 issue 发到你的邮箱

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