Skip to content

Commit dd52c02

Browse files
Address a rare issue in Generative tests
1 parent 59c16d9 commit dd52c02

File tree

1 file changed

+2
-1
lines changed
  • x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/command/pipe

1 file changed

+2
-1
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/command/pipe/LookupJoinGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ public CommandDescription generate(
4848
continue; // no candidate keys of the right type, skip this column
4949
}
5050
EsqlQueryGenerator.Column key = randomFrom(candidateKeys);
51-
if (usedColumns.contains(key.name())) {
51+
if (usedColumns.contains(key.name()) || usedColumns.contains(idxKey)) {
5252
continue; // already used this column, skip
5353
} else {
5454
usedColumns.add(key.name());
55+
usedColumns.add(idxKey);
5556
}
5657
keyNames.add(key.name());
5758
joinOn.add(idxKey);

0 commit comments

Comments
 (0)