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

EQL: Sequence/Join parsing and model #54227

Merged
merged 8 commits into from
Apr 6, 2020
Merged

Conversation

costin
Copy link
Member

@costin costin commented Mar 25, 2020

PR that parses the grammar for EQL join and sequence and creates their respective domain model.
The physical plan and execution will follow-up up in a separate PR.

@costin costin added the :Analytics/EQL EQL querying label Mar 25, 2020
@costin costin self-assigned this Mar 25, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (:Query Languages/EQL)

@costin costin changed the title EQL: Sequence/Join EQL: Sequence/Join parsing and model Apr 2, 2020
@costin costin marked this pull request as ready for review April 3, 2020 21:31
@costin
Copy link
Member Author

costin commented Apr 3, 2020

Considering the grammar around timeunits and fork is still discussed, I've let the parser and is and did not spend additional time on the tests; once the that part of the grammar gets locked again, this needs to be revisited.
However the existing test are passing with minor modifications.

case "days":
timeUnit = TimeUnit.DAYS;
break;
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

I added #54760 to track an issue for removing unknown time units and only supporting ones that are recognized by range queries.

@costin
Copy link
Member Author

costin commented Apr 4, 2020

@elasticmachine run elasticsearch-ci/2

@costin
Copy link
Member Author

costin commented Apr 4, 2020

@elasticmachine update branch

@costin
Copy link
Member Author

costin commented Apr 5, 2020

@elasticmachine update branch

Number number = (Number) visitIntegerLiteral((IntegerLiteralContext) numberCtx).fold();
long value = number.longValue();

if (value <= 0) {
Copy link
Member

Choose a reason for hiding this comment

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

does the sequence of 0 timespan make sense at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think not - if no maxspan is needed I opted for not declaring it.
If we agree to have 0 indicate no limit across EQL, the parser can be improved.

@costin costin merged commit 9e9632d into elastic:master Apr 6, 2020
@costin costin deleted the eql/sequence branch April 6, 2020 20:15
costin added a commit that referenced this pull request Apr 6, 2020
Add parsing and (logical) domain model for sequence and join

(cherry picked from commit 9e9632d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/EQL EQL querying
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants