-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ES|QL: Add support for LOOKUP JOIN on aliases #128519
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
base: main
Are you sure you want to change the base?
ES|QL: Add support for LOOKUP JOIN on aliases #128519
Conversation
Hi @luigidellaquila, I've created a changelog YAML for you. |
if (out.getTransportVersion().onOrAfter(TransportVersions.JOIN_ON_ALIASES)) { | ||
out.writeString(indexPattern); | ||
} else if (indexPattern.equals(shardId.getIndexName()) == false) { | ||
throw new EsqlIllegalArgumentException("Aliases and index patterns are not allowed for LOOKUP JOIN []", indexPattern); |
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.
Should we throw an exception here?
The alternative is to just allow to execute the JOIN on the remote node based on the index name (rather than the alias name), that means different security constraints and no alias filters.
Pinging @elastic/es-analytical-engine (Team:Analytics) |
@@ -521,7 +553,7 @@ abstract static class TransportRequest extends AbstractTransportRequest implemen | |||
|
|||
@Override | |||
public final String[] indices() { | |||
return new String[] { shardId.getIndexName() }; | |||
return new String[] { indexPattern }; |
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.
This is the real fix to the Security aspects
Adding support for LOOKUP JOIN on aliases: