apache / apache/parquet-java

parquet-avro logical type support broke ability to use avro reflection with generics.

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub
Component: Avro Component: Parquet Priority: Minor Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

Impacts 1.9.0 and 1.8.2.

Assuming the fieldClass is a concrete class (which it is for all of the logical types) is an incorrect assumption when generics are used.

Statistics {
T field1
T field2
}

SetStatistics extends Statistics> {}

Solution is to check if the fieldClass is abstract/interface/raw object.

**Reporter**: [Evan McClain](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aeroevan) / @aeroevan
**Assignee**: [Evan McClain](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aeroevan) / @aeroevan
#### Original Issue Attachments:
- [0001-Do-not-pass-knownClass-if-it-is-abstract-interface.patch](https://issues.apache.org/jira/secure/attachment/12850491/0001-Do-not-pass-knownClass-if-it-is-abstract-interface.patch)

**Note**: *This issue was originally created as [PARQUET-856](https://issues.apache.org/jira/browse/PARQUET-856). 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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.