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-4045: Use JDK compare for byte arrays #3126

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

belugabehr
Copy link
Contributor

What is the purpose of the change

  • This pull request improves read performance by using JDK byte compare functionality, fixing AVRO-4045.

Verifying this change

  • This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • Does this pull request introduce a new feature? no

@github-actions github-actions bot added the Java Pull Requests for Java binding label Aug 29, 2024
@belugabehr belugabehr force-pushed the belugabehr/jdk-compare branch from 4b05b82 to ff3d409 Compare August 31, 2024 04:08
@@ -181,16 +184,7 @@ private static int compare(Decoders d, Schema schema) throws IOException {
* return a positive value, if less than return a negative value.
*/
public static int compareBytes(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method could be marked as deprecated for 1.12 and removed in 1.13.0

Copy link
Contributor Author

@belugabehr belugabehr Sep 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Will try to follow up, but I always worry about pulling back stuff and adding any kind of friction to consumers to upgrade.

@belugabehr belugabehr merged commit 005ee80 into apache:main Sep 24, 2024
8 checks passed
@belugabehr belugabehr deleted the belugabehr/jdk-compare branch September 24, 2024 20:14
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
Development

Successfully merging this pull request may close these issues.

2 participants