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

The grouping clause "group all" allows only one expression #456

Open
hadrienk opened this issue May 28, 2024 · 0 comments
Open

The grouping clause "group all" allows only one expression #456

hadrienk opened this issue May 28, 2024 · 0 comments

Comments

@hadrienk
Copy link

hadrienk commented May 28, 2024

Issue Description

The group all can be used to group on an expression instead of identifier. The specification defines it as:

converts the values of an Identifier Component using conversionExpr and keeps all the resulting Identifiers

The "resulting identifiers" in plural is misleading. The grammar only defines one expression:

groupingClause:
    GROUP op=(BY | EXCEPT) componentID (COMMA componentID)*     # groupByOrExcept
    | GROUP ALL expr                                            # groupAll
  ;

There's also no way to specify the name of the resulting components.

Proposed Solution

Change the spec and grammar so that this statement is valid:

test := ds[aggr foo := sum(bar) group all id1 + id2 as id1_id2, length(id3) as id_length];
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

No branches or pull requests

1 participant