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

add SQL LENGTH() function as alias for len() #5486

Merged
merged 2 commits into from
Nov 17, 2024
Merged

add SQL LENGTH() function as alias for len() #5486

merged 2 commits into from
Nov 17, 2024

Conversation

mccanne
Copy link
Collaborator

@mccanne mccanne commented Nov 17, 2024

No description provided.

@mccanne mccanne requested a review from a team November 17, 2024 14:15
@@ -0,0 +1,9 @@
zed: SELECT LENGTH('W3Schools.com');
Copy link
Collaborator

@mattnibs mattnibs Nov 17, 2024

Choose a reason for hiding this comment

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

Put this in runtime/ztests/expr/function where the test for len is

@mccanne mccanne merged commit 5c1851b into main Nov 17, 2024
3 checks passed
@mccanne mccanne deleted the sql-length branch November 17, 2024 18:17
@philrz
Copy link
Contributor

philrz commented Nov 17, 2024

Verified in super commit 5c1851b.

Before:

$ super -version
Version: v1.18.0-156-gb2c46ef7

$ super -c "SELECT LENGTH('W3Schools.com');"
no such function at line 1, column 8:
SELECT LENGTH('W3Schools.com');
       ~~~~~~~~~~~~~~~~~~~~~~~

Now:

$ super -version
Version: v1.18.0-157-g5c1851be

$ super -c "SELECT LENGTH('W3Schools.com');"
{length:13}

Thanks @mccanne!

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.

3 participants