-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
add mysql compatible function bit_length #24531
Conversation
|
375c8bc
to
3ae5a92
Compare
Thanks for the release note! A few minor changes suggested to follow the Release Notes Guidelines.
|
Can you please add some documentation? (preferrably in https://prestodb.io/docs/current/functions/string.html) |
d75c251
to
4a7156e
Compare
Done. |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (docs)
Pull branch, new local doc build, looks good. Thanks!
@@ -104,6 +104,15 @@ public static long charLength(@LiteralParameter("x") long x, @SqlType("char(x)") | |||
return x; | |||
} | |||
|
|||
@Description("count of bits for the given string") | |||
@ScalarFunction("bit_length") | |||
@LiteralParameters("x") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This literal parameter is not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I refer to the implementation of the length function in StringFunctions.java.
I think you can squash both commits into the first one |
4a7156e
to
4de2500
Compare
Done. |
Description
Add a mysql compatible function bit_length, it returns the count of bits for the given string.
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.