Skip to content

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
* Lexicographically compare bytes. If equal, return zero. If greater-than,
* 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.

Copy link
Contributor

@RyanSkraba RyanSkraba Nov 23, 2025

Choose a reason for hiding this comment

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

It appears this public method has users, and this change was noticed in #3537! We should probably keep this method.

@belugabehr belugabehr merged commit 005ee80 into apache:main Sep 24, 2024
@belugabehr belugabehr deleted the belugabehr/jdk-compare branch September 24, 2024 20:14
opwvhk pushed a commit to opwvhk/avro that referenced this pull request Sep 5, 2025
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.

3 participants