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

fix(go/java): Enhance ASCII check in meta string encoding #1631

Merged
merged 5 commits into from
May 14, 2024

Conversation

jasonmokk
Copy link
Contributor

@jasonmokk jasonmokk commented May 14, 2024

What does this PR do?

This PR enhances the current ASCII check (before meta string encoding) I implemented in #1620 to return a UTF-8 encoded MetaString early if the input is non-ASCII. This improves efficiency and saves time on computeEncoding and encode. Unit tests are also added.

Related issues

#1619

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

Signed-off-by: Jason Mok <jjasonmok1@gmail.com>
@jasonmokk jasonmokk changed the title Fix(go/java): Enhance ASCII check in meta string encoding fix(go/java): Enhance ASCII check in meta string encoding May 14, 2024
Signed-off-by: Jason Mok <jjasonmok1@gmail.com>
Signed-off-by: Jason Mok <jjasonmok1@gmail.com>
Signed-off-by: Jason Mok <jjasonmok1@gmail.com>
Signed-off-by: Jason Mok <jjasonmok1@gmail.com>
@jasonmokk jasonmokk marked this pull request as ready for review May 14, 2024 05:55
Copy link
Contributor

@LiangliangSui LiangliangSui left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@LiangliangSui LiangliangSui merged commit b904639 into apache:main May 14, 2024
33 checks passed
@jasonmokk jasonmokk deleted the ascii-check branch May 14, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Java|Go] Check string is ascii before using meta string encoding
2 participants