-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Add syntax for FIRST and LAST #132474
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,8 @@ primaryExpression | |
| ; | ||
|
|
||
| functionExpression | ||
| : functionName LP (ASTERISK | (booleanExpression (COMMA booleanExpression)* (COMMA mapExpression)?))? RP | ||
| : functionName LP (ASTERISK | (booleanExpression (COMMA booleanExpression)* (COMMA mapExpression)?))? RP #functionStandard | ||
| | (FIRST | LAST) LP value=booleanExpression BY by=booleanExpression RP #functionFirstLast | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should work that we specifically allow I think we shouldn't introduce the I'd start with I think a straight-forward way would be to adjust There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once |
||
| ; | ||
|
|
||
| functionName | ||
|
|
||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why value and by are boolean expressions? I would expect something about column identifier.
Also I am a bit worried about making a custom syntax for each function.
I understand the workaround for FIRST and LAST, however I am not sure if we should also have
BYin it opposed to a simpler coma separated list of parameters.I am imagining something like:
I feel like #132469 could be a safer option