Skip to content

Commit 5d45936

Browse files
committed
Checkstyle fix.
1 parent 816993f commit 5d45936

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,9 @@
104104
import static org.hamcrest.Matchers.containsString;
105105
import static org.hamcrest.Matchers.empty;
106106
import static org.hamcrest.Matchers.equalTo;
107-
import static org.hamcrest.Matchers.hasItem;
108107
import static org.hamcrest.Matchers.hasSize;
109108
import static org.hamcrest.Matchers.instanceOf;
110109
import static org.hamcrest.Matchers.is;
111-
import static org.hamcrest.Matchers.matchesRegex;
112110
import static org.hamcrest.Matchers.not;
113111
import static org.hamcrest.Matchers.notNullValue;
114112
import static org.hamcrest.Matchers.startsWith;
@@ -3106,7 +3104,8 @@ public void testResolveRerankInferenceId() {
31063104
assertThat(
31073105
ve.getMessage(),
31083106
containsString(
3109-
"cannot use inference endpoint [completion-inference-id] with task type [completion] within a Rerank command. Only inference endpoints with the task type [rerank] are supported"
3107+
"cannot use inference endpoint [completion-inference-id] with task type [completion] within a Rerank command. "
3108+
+ "Only inference endpoints with the task type [rerank] are supported"
31103109
)
31113110
);
31123111
}
@@ -3160,21 +3159,18 @@ public void testResolveRerankFields() {
31603159

31613160
{
31623161
// Multiple fields.
3163-
LogicalPlan plan = analyze(
3164-
"""
3165-
FROM books
3166-
| WHERE title:"italian food recipe"
3167-
| RERANK "italian food recipe" ON title, description=SUBSTRING(description, 0, 100), yearRenamed=year WITH "reranking-inference-id"
3168-
""",
3169-
"mapping-books.json"
3170-
);
3162+
LogicalPlan plan = analyze("""
3163+
FROM books
3164+
| WHERE title:"food"
3165+
| RERANK "food" ON title, description=SUBSTRING(description, 0, 100), yearRenamed=year WITH "reranking-inference-id"
3166+
""", "mapping-books.json");
31713167

31723168
Limit limit = as(plan, Limit.class); // Implicit limit added by AddImplicitLimit rule.
31733169
Rerank rerank = as(limit.child(), Rerank.class);
31743170
Filter filter = as(rerank.child(), Filter.class);
31753171
EsRelation relation = as(filter.child(), EsRelation.class);
31763172

3177-
assertThat(rerank.queryText(), equalTo(string("italian food recipe")));
3173+
assertThat(rerank.queryText(), equalTo(string("food")));
31783174
assertThat(rerank.inferenceId(), equalTo(string("reranking-inference-id")));
31793175

31803176
assertThat(rerank.rerankFields(), hasSize(3));

0 commit comments

Comments
 (0)