Skip to content

Commit d253614

Browse files
committed
Fix tests
1 parent cdfaa07 commit d253614

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-function.csv-spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ host:keyword | semantic_text_field:text
675675
;
676676

677677
testMatchWithOptionsFuzziness
678+
required_capability: match_function
678679
required_capability: match_function_options
679680

680681
from books
@@ -690,6 +691,7 @@ book_no:keyword
690691
;
691692

692693
testMatchWithOptionsOperator
694+
required_capability: match_function
693695
required_capability: match_function_options
694696

695697
from books
@@ -701,6 +703,7 @@ The Hobbit or There and Back Again
701703
;
702704

703705
testMatchWithOptionsMinimumShouldMatch
706+
required_capability: match_function
704707
required_capability: match_function_options
705708

706709
from books

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,6 @@ public final void testLiteralExpressions() {
419419

420420
@Override
421421
protected Expression build(Source source, List<Expression> args) {
422-
return new Match(source, args.get(0), args.get(1), args.get(2));
422+
return new Match(source, args.get(0), args.get(1), args.size() > 2 ? args.get(2) : null);
423423
}
424424
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/TermTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ private static String matchTypeErrorSupplier(boolean includeOrdinal, List<Set<Da
127127

128128
@Override
129129
protected Expression build(Source source, List<Expression> args) {
130-
return new Match(source, args.get(0), args.get(1), args.get(2));
130+
return new Match(source, args.get(0), args.get(1), args.size() > 2 ? args.get(2) : null);
131131
}
132132
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/querydsl/query/MatchQueryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static MatchQueryBuilder getBuilder(Map<String, Object> options) {
7373
public void testToString() {
7474
final Source source = new Source(1, 1, StringUtils.EMPTY);
7575
FieldAttribute fa = new FieldAttribute(EMPTY, "a", new EsField("af", KEYWORD, emptyMap(), true));
76-
final MatchQuery mmq = new MatchQuery(source, "eggplant", "foo", null);
76+
final MatchQuery mmq = new MatchQuery(source, "eggplant", "foo");
7777
assertEquals("MatchQuery@1:2[eggplant:foo]", mmq.toString());
7878
}
7979
}

0 commit comments

Comments
 (0)