Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Make ARRAY_LENGTH working with JSON arrays #711

Merged
merged 2 commits into from
May 20, 2019
Merged

Make ARRAY_LENGTH working with JSON arrays #711

merged 2 commits into from
May 20, 2019

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented May 14, 2019

Signed-off-by: kuba-- kuba@sourced.tech
This PR add support to ARRAY_LENGTH for other type of array (e.g. JSON).
If we want to count something what will be extracted from diffs by EXPLODE/JSON_EXTRACT we need ARRAY_LENGTH with support for other arrays, e.g.:

SELECT ARRAY_LENGTH(JSON_EXTRACT('[{"i":0}, {"i":1, "y":"yyy"}, {"i":2, "x":"xxx"}]', '$.i'))

@kuba-- kuba-- added the proposal proposal for new additions or changes label May 14, 2019
@kuba-- kuba-- requested a review from a team May 14, 2019 13:44
Signed-off-by: kuba-- <kuba@sourced.tech>
@erizocosmico
Copy link
Contributor

LGTM once tests pass.

@kuba--
Copy link
Contributor Author

kuba-- commented May 17, 2019

rebuild C# helped

Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

LGTM after rebase

@ajnavarro ajnavarro merged commit 8ae4350 into src-d:master May 20, 2019
@kuba-- kuba-- deleted the arraylength branch May 20, 2019 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal proposal for new additions or changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy