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: Misleading verbiage about recognized but unsupported pipe names #70844

Closed
rw-access opened this issue Mar 24, 2021 · 2 comments · Fixed by #74850
Closed

EQL: Misleading verbiage about recognized but unsupported pipe names #70844

rw-access opened this issue Mar 24, 2021 · 2 comments · Fixed by #74850
Assignees
Labels
:Analytics/EQL EQL querying Team:QL (Deprecated) Meta label for query languages team

Comments

@rw-access
Copy link
Contributor

Two pipes are recognized and supported: | head N and | tail N.

There are additional pipes that we recognize in EQL because their names were around for Endgame EQL (docs).

We don't support these pipes. However the message says "yet" and that can be misleading about roadmap. We should update it to either say "unrecognized pipe", "this pipe is not supported" or something similar.

See

private LogicalPlan pipe(PipeContext ctx, LogicalPlan plan) {
String name = text(ctx.IDENTIFIER());
if (SUPPORTED_PIPES.contains(name) == false) {
List<String> potentialMatches = StringUtils.findSimilar(name, SUPPORTED_PIPES);
String msg = "Unrecognized pipe [{}]";
if (potentialMatches.isEmpty() == false) {
String matchString = potentialMatches.toString();
msg += ", did you mean " + (potentialMatches.size() == 1
? matchString
: "any of " + matchString) + "?";
}
throw new ParsingException(source(ctx.IDENTIFIER()), msg, name);
}
switch (name) {
case HEAD_PIPE:
Expression headLimit = pipeIntArgument(source(ctx), name, ctx.booleanExpression());
return new Head(source(ctx), headLimit, plan);
case TAIL_PIPE:
Expression tailLimit = pipeIntArgument(source(ctx), name, ctx.booleanExpression());
// negate the limit
return new Tail(source(ctx), tailLimit, plan);
default:
throw new ParsingException(source(ctx), "Pipe [{}] is not supported yet", name);
}
}

@rw-access rw-access added :Analytics/EQL EQL querying Team:QL (Deprecated) Meta label for query languages team labels Mar 24, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@astefan astefan self-assigned this Mar 25, 2021
@rw-access
Copy link
Contributor Author

Bumping this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/EQL EQL querying Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants