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

Feature request: ListPushBack/ListPushFront #47

Open
UnamedRus opened this issue May 4, 2022 · 0 comments
Open

Feature request: ListPushBack/ListPushFront #47

UnamedRus opened this issue May 4, 2022 · 0 comments
Labels
area/yql YQL query language issues enhancement New feature or request external

Comments

@UnamedRus
Copy link

Ability to add single element to list without wrapping it to a list:

SELECT ListPushBack(aaa, val) FROM (SELECT [1,2,3] AS aaa, 5 as val);

[1,2,3,5]

Current approach:

SELECT ListExtend(aaa, [val]) FROM (SELECT [1,2,3] AS aaa, 5 as val);

[1,2,3,5]


SELECT ListPushFront(aaa, val) FROM (SELECT [1,2,3] AS aaa, 5 as val);

[5,1,2,3]

Current approach:

SELECT ListExtend([val], aaa) FROM (SELECT [1,2,3] AS aaa, 5 as val);

[5,1,2,3]

It can save quite a bit of cpu on avoiding casting of value to a list.

@fomichev3000 fomichev3000 added area/queryprocessor Query processor issues and requests enhancement New feature or request and removed sql labels May 18, 2022
@fomichev3000 fomichev3000 added area/yql YQL query language issues and removed area/queryprocessor Query processor issues and requests labels Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/yql YQL query language issues enhancement New feature or request external
Projects
None yet
Development

No branches or pull requests

3 participants