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 json_array_length Presto Json function #2294

Closed
wants to merge 2 commits into from

Conversation

pramodsatya
Copy link
Collaborator

@pramodsatya pramodsatya commented Aug 15, 2022

Adds Json function json_array_length to find the length of Json arrays, if the Json object doesn't represent an array, return NULL.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 15, 2022
@pramodsatya pramodsatya marked this pull request as draft August 15, 2022 16:40
@Yuhta Yuhta requested a review from kagamiori August 15, 2022 16:41
Copy link
Contributor

@kagamiori kagamiori left a comment

Choose a reason for hiding this comment

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

Hi Pramod, Thank you for adding this function.

velox/functions/prestosql/JsonFunctions.h Outdated Show resolved Hide resolved
@pramodsatya pramodsatya force-pushed the json_len branch 2 times, most recently from 7d5a5bd to 33743b5 Compare August 15, 2022 18:53
Copy link
Collaborator

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks Pramod. Looks good overall.

velox/functions/prestosql/JsonFunctions.h Outdated Show resolved Hide resolved
velox/functions/prestosql/tests/JsonFunctionsTest.cpp Outdated Show resolved Hide resolved
@kagamiori
Copy link
Contributor

Looks good to me. Thank you for making the changes!

@facebook-github-bot
Copy link
Contributor

@kagamiori has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@pramodsatya pramodsatya marked this pull request as ready for review August 15, 2022 23:28
@bikramSingh91
Copy link
Contributor

@pramodsatya Thanks for making this change. As a follow up can you please also update the coverage map.
Instructions: https://github.com/facebookincubator/velox/blob/main/velox/functions/prestosql/coverage/README.md

cc: @kagamiori

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants