Skip to content

Commit f9649da

Browse files
committed
Fix CsvTests
1 parent 3a10b44 commit f9649da

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/LuceneQueryEvaluator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public record ShardConfig(Query query, IndexSearcher searcher) {}
5454
private final List<ShardState> perShardState;
5555

5656
protected LuceneQueryEvaluator(BlockFactory blockFactory, ShardConfig[] shards) {
57+
assert shards != null && shards.length > 0 : "LuceneQueryEvaluator requires shard information";
5758
this.blockFactory = blockFactory;
5859
this.shards = shards;
5960
this.perShardState = new ArrayList<>(Collections.nCopies(shards.length, null));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ required_capability: multi_match_function
7070
required_capability: full_text_functions_disjunctions_compute_engine
7171

7272
from books
73-
| where multi_match("lord", "title", "summary", {}) or length(title) > 130
73+
| where multi_match("lord", "title", "summary", {"operator": "AND"}) or length(title) > 130
7474
| keep book_no
7575
;
7676
ignoreOrder: true

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ public final void test() throws Throwable {
301301
"CSV tests cannot currently handle scoring that depends on Lucene",
302302
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.METADATA_SCORE.capabilityName())
303303
);
304+
assumeFalse(
305+
"CSV tests cannot currently handle multi_match function that depends on Lucene",
306+
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.MULTI_MATCH_FUNCTION.capabilityName())
307+
);
304308

305309
if (Build.current().isSnapshot()) {
306310
assertThat(

0 commit comments

Comments
 (0)