-
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
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/PrimitivesArrays.java
Fixed
Show fixed
Hide fixed
lang/java/avro/src/test/java/org/apache/avro/generic/GenericDataTest.java
Fixed
Show fixed
Hide fixed
lang/java/avro/src/test/java/org/apache/avro/generic/GenericDataTest.java
Fixed
Show fixed
Hide fixed
|
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 |
|
Hi @mskells, As it stands now, I propose to merge this next week unless there's any objection. |
|
@opwvhk There is no such rule (3 approvals) at Apache. Maybe you are confused with the release votes. If you feel confident that a change is good then feel free to merge it! |
That's possible, though it would be a misinterpretation of what code modification votes are for, not package releases.
👍 Let's take this as the Avro way then. It's also more convenient for me. |
…te array implementation (#3307) * AVRO-4039 fix GenericData.newArray only return an appropriate array * AVRO-4039 fix GenericData.newArray only return an appropriate array * AVRO-4039 fix GenericData.newArray spotless * AVRO-4039 fix import that spotless removed * AVRO-4039 review feedback remove schema check on returned value Check convertors with logical types * AVRO-4039 review feedback * AVRO-4039 review feedback (cherry picked from commit 09277d0)
…te array implementation (apache#3307) * AVRO-4039 fix GenericData.newArray only return an appropriate array * AVRO-4039 fix GenericData.newArray only return an appropriate array * AVRO-4039 fix GenericData.newArray spotless * AVRO-4039 fix import that spotless removed * AVRO-4039 review feedback remove schema check on returned value Check convertors with logical types * AVRO-4039 review feedback * AVRO-4039 review feedback
What is the purpose of the change
PrimitiveArraywhen it would not be appropriateGenericContaineris returned the schema must match the supplied schemaappropriate means that
GenericContainerand 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