-
Notifications
You must be signed in to change notification settings - Fork 1.7k
AVRO-4039 [java] fix GenericData.newArray to only return an appropriate array implementation #3307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
AVRO-4039 [java] fix GenericData.newArray to only return an appropriate array implementation #3307
Conversation
only return an appropriate array
related issue - https://issues.apache.org/jira/browse/AVRO-4039 |
only return an appropriate array
lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
Outdated
Show resolved
Hide resolved
lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
Outdated
Show resolved
Hide resolved
lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
Outdated
Show resolved
Hide resolved
lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
Fixed
Show resolved
Hide resolved
lang/java/avro/src/main/java/org/apache/avro/generic/PrimitivesArrays.java
Fixed
Show resolved
Hide resolved
lang/java/avro/src/test/java/org/apache/avro/generic/GenericDataTest.java
Fixed
Show resolved
Hide resolved
lang/java/avro/src/test/java/org/apache/avro/generic/GenericDataTest.java
Fixed
Show resolved
Hide resolved
Hi @mkeskells, |
doh pushed now |
@opwvhk What's the process from here to get this merged? Does it need other reviewers to approve etc? |
Hi |
@mkeskells it seems like it can be merged now. I am also waiting for this fix as it blocks us from upgrading Quarkus beyond version 3.13 |
@jasmdk I don't have permission to merge. I don't know who is the appropriate maintainer who can merge this |
What is the purpose of the change
PrimitiveArray
when it would not be appropriateGenericContainer
is returned the schema must match the supplied schemaappropriate means that
GenericContainer
and thus has a schema, then the schema is the sameIf we can't reuse the supplied value, then generate an appropriate collection, using the optimised values where we can
Updated the documentation, and added tests
Verifying this change
This change added tests and can be verified as follows:
Documentation