Skip to content

Commit 4877657

Browse files
committed
Enable only in snapshot builds for now
1 parent 201813b commit 4877657

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ public enum Cap {
11901190
/**
11911191
* Enable support for cross-cluster lookup joins.
11921192
*/
1193-
ENABLE_LOOKUP_JOIN_ON_REMOTE,
1193+
ENABLE_LOOKUP_JOIN_ON_REMOTE(Build.current().isSnapshot()),
11941194

11951195
/**
11961196
* MATCH PHRASE function

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
import java.util.function.Function;
9191

9292
import static java.util.Collections.emptyList;
93-
import static org.elasticsearch.xpack.esql.common.Failure.fail;
9493
import static org.elasticsearch.xpack.esql.core.type.DataType.KEYWORD;
9594
import static org.elasticsearch.xpack.esql.core.util.StringUtils.WILDCARD;
9695
import static org.elasticsearch.xpack.esql.expression.NamedExpressions.mergeOutputExpressions;
@@ -642,6 +641,9 @@ public PlanFactory visitJoinCommand(EsqlBaseParser.JoinCommandContext ctx) {
642641
return false;
643642
}
644643
});
644+
if (hasRemotes && EsqlCapabilities.Cap.ENABLE_LOOKUP_JOIN_ON_REMOTE.isEnabled() == false) {
645+
throw new ParsingException(source, "remote clusters are not supported with LOOKUP JOIN");
646+
}
645647
return new LookupJoin(source, p, right, joinFields, hasRemotes);
646648
};
647649
}

0 commit comments

Comments
 (0)