Skip to content
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-2943 improve GenericRecord MAP type comparison #974

Conversation

frankgrimes97
Copy link
Contributor

Make GenericRecord comparison handle String vs Utf8 for MAP type
This mirrors what was already previously done for Schema.type.STRING

Adds the following new unit tests:

  • org.apache.avro.generic.TestGenericData.testMapKeyEquals
  • org.apache.avro.generic.TestGenericData.testMapValuesEquals

N.B.
We should also consider doing the same for Schema.type.ARRAY

https://issues.apache.org/jira/browse/AVRO-2943

Make GenericRecord comparison handle String vs Utf8 for MAP type
This mirrors what was already previously done for Schema.type.STRING

Adds the following new unit tests:
  - org.apache.avro.generic.TestGenericData.testMapKeyEquals
  - org.apache.avro.generic.TestGenericData.testMapValuesEquals

N.B.
We should also consider doing the same for Schema.type.ARRAY

https://issues.apache.org/jira/browse/AVRO-2943
@github-actions github-actions bot added the Java Pull Requests for Java binding label Nov 3, 2020
@dkulp dkulp merged commit 197a0ec into apache:master Mar 9, 2023
frankgrimes97 added a commit to frankgrimes97/avro that referenced this pull request Mar 9, 2023
frankgrimes97 added a commit to frankgrimes97/avro that referenced this pull request Mar 10, 2023
GenericRecord comparison already handles String vs Utf8 for ARRAY elements.
This just adds a unit test to explicitly verify the current correct behaviour.

Also renamed GenericData String/Utf8 MAP unit tests which were added
on apache#974 to improve
clarity on what those tests are actually verifying.

https://issues.apache.org/jira/browse/AVRO-2943
RyanSkraba pushed a commit that referenced this pull request Mar 13, 2023
)

GenericRecord comparison already handles String vs Utf8 for ARRAY elements.
This just adds a unit test to explicitly verify the current correct behaviour.

Also renamed GenericData String/Utf8 MAP unit tests which were added
on #974 to improve
clarity on what those tests are actually verifying.

https://issues.apache.org/jira/browse/AVRO-2943
@RyanSkraba
Copy link
Contributor

Hello @dkulp ! Should this be cherry-picked to branch-1.11 ?

@aromanenko-dev
Copy link

aromanenko-dev commented Mar 15, 2023

@RyanSkraba It would be great!

RyanSkraba pushed a commit to RyanSkraba/avro that referenced this pull request Jun 13, 2023
…ache#2137)

GenericRecord comparison already handles String vs Utf8 for ARRAY elements.
This just adds a unit test to explicitly verify the current correct behaviour.

Also renamed GenericData String/Utf8 MAP unit tests which were added
on apache#974 to improve
clarity on what those tests are actually verifying.

https://issues.apache.org/jira/browse/AVRO-2943
RyanSkraba pushed a commit that referenced this pull request Jun 14, 2023
)

GenericRecord comparison already handles String vs Utf8 for ARRAY elements.
This just adds a unit test to explicitly verify the current correct behaviour.

Also renamed GenericData String/Utf8 MAP unit tests which were added
on #974 to improve
clarity on what those tests are actually verifying.

https://issues.apache.org/jira/browse/AVRO-2943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
4 participants