Skip to content

Commit bb8e290

Browse files
committed
Fix tests
1 parent 7ee299d commit bb8e290

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private static void checkFullTextQueryFunctions(LogicalPlan plan, Failures failu
205205
checkCommandsBeforeExpression(
206206
plan,
207207
condition,
208-
Match.class,
208+
AbstractMatchFullTextFunction.class,
209209
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
210210
m -> "[" + m.functionName() + "] " + m.functionType(),
211211
failures

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.elasticsearch.xpack.esql.expression.function.aggregate.Count;
4242
import org.elasticsearch.xpack.esql.expression.function.aggregate.Max;
4343
import org.elasticsearch.xpack.esql.expression.function.aggregate.Min;
44-
import org.elasticsearch.xpack.esql.expression.function.fulltext.Match;
44+
import org.elasticsearch.xpack.esql.expression.function.fulltext.MatchOperator;
4545
import org.elasticsearch.xpack.esql.expression.function.scalar.map.LogWithBaseInMap;
4646
import org.elasticsearch.xpack.esql.index.EsIndex;
4747
import org.elasticsearch.xpack.esql.index.IndexResolution;
@@ -2584,7 +2584,7 @@ public void testFromEnrichAndMatchColonUsage() {
25842584
""", "mapping-default.json");
25852585
var limit = as(plan, Limit.class);
25862586
var filter = as(limit.child(), Filter.class);
2587-
var match = as(filter.condition(), Match.class);
2587+
var match = as(filter.condition(), MatchOperator.class);
25882588
var enrich = as(filter.child(), Enrich.class);
25892589
assertEquals(enrich.mode(), Enrich.Mode.ANY);
25902590
assertEquals(enrich.policy().getMatchField(), "language_code");

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.elasticsearch.xpack.esql.expression.UnresolvedNamePattern;
2929
import org.elasticsearch.xpack.esql.expression.function.UnresolvedFunction;
3030
import org.elasticsearch.xpack.esql.expression.function.aggregate.FilteredExpression;
31-
import org.elasticsearch.xpack.esql.expression.function.fulltext.Match;
31+
import org.elasticsearch.xpack.esql.expression.function.fulltext.MatchOperator;
3232
import org.elasticsearch.xpack.esql.expression.function.scalar.convert.ToInteger;
3333
import org.elasticsearch.xpack.esql.expression.function.scalar.string.RLike;
3434
import org.elasticsearch.xpack.esql.expression.function.scalar.string.WildcardLike;
@@ -2316,7 +2316,7 @@ public void testMetricWithGroupKeyAsAgg() {
23162316
public void testMatchOperatorConstantQueryString() {
23172317
var plan = statement("FROM test | WHERE field:\"value\"");
23182318
var filter = as(plan, Filter.class);
2319-
var match = (Match) filter.condition();
2319+
var match = (MatchOperator) filter.condition();
23202320
var matchField = (UnresolvedAttribute) match.field();
23212321
assertThat(matchField.name(), equalTo("field"));
23222322
assertThat(match.query().fold(FoldContext.small()), equalTo("value"));
@@ -2360,7 +2360,7 @@ public void testMatchFunctionFieldCasting() {
23602360
public void testMatchOperatorFieldCasting() {
23612361
var plan = statement("FROM test | WHERE field::int : \"value\"");
23622362
var filter = as(plan, Filter.class);
2363-
var match = (Match) filter.condition();
2363+
var match = (MatchOperator) filter.condition();
23642364
var toInteger = (ToInteger) match.field();
23652365
var matchField = (UnresolvedAttribute) toInteger.field();
23662366
assertThat(matchField.name(), equalTo("field"));

0 commit comments

Comments
 (0)