Skip to content

Commit 1b92979

Browse files
Fix failing UTs
1 parent d24dab3 commit 1b92979

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/ExpressionQueryList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ private void buildPrePostJoinFilter(PhysicalPlan rightPreJoinPlan, ClusterServic
8585
} catch (IOException e) {
8686
throw new IllegalArgumentException("Failed to translate pre-join filter: " + esQueryExec, e);
8787
}
88-
} else {
89-
throw new IllegalArgumentException("Unsupported pre-join filter type: " + preJoinFilters.getClass().getName());
88+
} else if (rightPreJoinPlan != null) {
89+
throw new IllegalArgumentException("Unsupported pre-join filter type: " + rightPreJoinPlan.getClass().getName());
9090
}
9191
}
9292

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/LookupFromIndexOperator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public String describe() {
6262
.append(" inputChannel=")
6363
.append(matchField.channel());
6464
}
65-
stringBuilder.append(" rightPreJoinPlan=").append(rightPreJoinPlan);
65+
stringBuilder.append(" right_pre_join_plan=").append(rightPreJoinPlan);
6666
stringBuilder.append("]");
6767
return stringBuilder.toString();
6868
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/enrich/LookupFromIndexOperatorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected Matcher<String> expectedToStringOfSimple() {
187187
for (int i = 0; i < numberOfJoinColumns; i++) {
188188
sb.append(" input_type=LONG match_field=match").append(i).append(" inputChannel=").append(i);
189189
}
190-
sb.append("]");
190+
sb.append(" right_pre_join_plan=null]");
191191
return matchesPattern(sb.toString());
192192
}
193193

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7055,7 +7055,9 @@ public void testLookupJoinPushDownSeparatedForConjunctionBetweenLeftAndRightFiel
70557055
assertThat(literal.value(), equalTo(1));
70567056

70577057
var leftRel = as(filter.child(), EsRelation.class);
7058-
var rightRel = as(join.right(), EsRelation.class);
7058+
var filterRight = as(join.right(), Filter.class);
7059+
assertEquals("language_name == \"English\"", filterRight.condition().toString());
7060+
var rightRel = as(filterRight.child(), EsRelation.class);
70597061
}
70607062

70617063
/**

0 commit comments

Comments
 (0)