-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
implementing ORD()
function
#2256
Conversation
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.
ORD
changes look great. Looks like the change to return booleans as 1
or 0
instead of true
or false
just needs a little more massaging to make tests happy again. I think you're right that we should fix that though. Probably worth checking ahead of time for any Dolt tests that break from that, too.
I think the server engine tests have a transform step that convert true
to 1
, so you might be able to just take that out to get them working now that you fixed the root of the boolean representation problem.
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.
Looks good! You may want to do a pre-build/test against Dolt to catch any test changes for the boolean representation change.
This PR adds support for the
ORD()
function in MySQL, which converts a unicode character into its numerical representation.In the case of
STRINGS
, only the leftmost unicode character is evaluated.Additionally, this PR fixes the bool -> string coversion to match MySQL.
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_ord
Also fixes: dolthub/dolt#7323