Skip to content

Commit 66e3dcb

Browse files
committed
Fix tests
1 parent e4ef60f commit 66e3dcb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ public void testDenseVectorImplicitCastingKnn() {
23442344
Analyzer analyzer = analyzer(loadMapping("mapping-dense_vector.json", "vectors"));
23452345

23462346
var plan = analyze("""
2347-
from test | where knn(vector, [0.342, 0.164, 0.234], 10)
2347+
from test | where knn(vector, [0.342, 0.164, 0.234])
23482348
""", "mapping-dense_vector.json");
23492349

23502350
var limit = as(plan, Limit.class);

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ public void testFieldBasedFullTextFunctions() throws Exception {
12451245
checkFieldBasedFunctionNotAllowedAfterCommands("Term", "function", "term(title, \"Meditation\")");
12461246
}
12471247
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
1248-
checkFieldBasedFunctionNotAllowedAfterCommands("KNN", "function", "knn(vector, [1, 2, 3], 10)");
1248+
checkFieldBasedFunctionNotAllowedAfterCommands("KNN", "function", "knn(vector, [1, 2, 3])");
12491249
}
12501250
}
12511251

@@ -1378,7 +1378,7 @@ public void testFullTextFunctionsOnlyAllowedInWhere() throws Exception {
13781378
checkFullTextFunctionsOnlyAllowedInWhere("MultiMatch", "multi_match(\"Meditation\", title, body)", "function");
13791379
}
13801380
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
1381-
checkFullTextFunctionsOnlyAllowedInWhere("KNN", "knn(vector, [0, 1, 2], 10)", "function");
1381+
checkFullTextFunctionsOnlyAllowedInWhere("KNN", "knn(vector, [0, 1, 2])", "function");
13821382
}
13831383

13841384
}
@@ -1433,7 +1433,7 @@ public void testFullTextFunctionsDisjunctions() {
14331433
checkWithFullTextFunctionsDisjunctions("term(title, \"Meditation\")");
14341434
}
14351435
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
1436-
checkWithFullTextFunctionsDisjunctions("knn(vector, [1, 2, 3], 10)");
1436+
checkWithFullTextFunctionsDisjunctions("knn(vector, [1, 2, 3])");
14371437
}
14381438
}
14391439

@@ -1498,7 +1498,7 @@ public void testFullTextFunctionsWithNonBooleanFunctions() {
14981498
checkFullTextFunctionsWithNonBooleanFunctions("Term", "term(title, \"Meditation\")", "function");
14991499
}
15001500
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
1501-
checkFullTextFunctionsWithNonBooleanFunctions("KNN", "knn(vector, [1, 2, 3], 10)", "function");
1501+
checkFullTextFunctionsWithNonBooleanFunctions("KNN", "knn(vector, [1, 2, 3])", "function");
15021502
}
15031503
}
15041504

@@ -2148,7 +2148,7 @@ public void testFullTextFunctionOptions() {
21482148
checkOptionDataTypes(MultiMatch.OPTIONS, "FROM test | WHERE MULTI_MATCH(\"Jean\", title, body, {\"%s\": %s})");
21492149
}
21502150
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
2151-
checkOptionDataTypes(Knn.ALLOWED_OPTIONS, "FROM test | WHERE KNN(vector, [0.1, 0.2, 0.3], 10, {\"%s\": %s})");
2151+
checkOptionDataTypes(Knn.ALLOWED_OPTIONS, "FROM test | WHERE KNN(vector, [0.1, 0.2, 0.3], {\"%s\": %s})");
21522152
}
21532153
}
21542154

@@ -2268,7 +2268,7 @@ public void testFullTextFunctionsInStats() {
22682268
checkFullTextFunctionsInStats("multi_match(\"Meditation\", title, body)");
22692269
}
22702270
if (EsqlCapabilities.Cap.KNN_FUNCTION_V4.isEnabled()) {
2271-
checkFullTextFunctionsInStats("knn(vector, [0, 1, 2], 10)");
2271+
checkFullTextFunctionsInStats("knn(vector, [0, 1, 2])");
22722272
}
22732273
}
22742274

0 commit comments

Comments
 (0)