GroupType.union(Type toMerge, boolean strict) does not honor strict parameter
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
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.*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Tìm trong codebase Parquet Java GroupType.union(Type toMerge, boolean strict), sau đó kiểm tra cách mergeFields được gọi từ phương thức đó. Xác nhận rằng giá trị strict được truyền tiếp như mô tả và chạy các bài kiểm thử liên quan của dự án để xác minh hành vi gộp schema ở chế độ strict và không strict.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- data-engineering
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 38/100