Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
073afe0
CSV IT spec
idegtiarenko Feb 17, 2026
c8a026d
[CI] Auto commit changes from spotless
Feb 17, 2026
d108057
fix testing conversion
idegtiarenko Feb 17, 2026
fe115f3
apply mapping overrides
idegtiarenko Feb 17, 2026
3dc6c45
fix several tests
idegtiarenko Feb 17, 2026
ba290fd
fix converting for the value assertion
idegtiarenko Feb 17, 2026
29c3ad6
[CI] Auto commit changes from spotless
Feb 17, 2026
c8e740b
ignore test with non-existing capability
idegtiarenko Feb 17, 2026
d4cb843
lazy load indices
idegtiarenko Feb 18, 2026
9a8c1c7
[CI] Auto commit changes from spotless
Feb 18, 2026
9afd0ca
lazy load views
idegtiarenko Feb 18, 2026
6c47c5c
narrow down pattern resolution in test
idegtiarenko Feb 18, 2026
286448f
[CI] Auto commit changes from spotless
Feb 18, 2026
53face7
verify warnings
idegtiarenko Feb 18, 2026
5b343b9
fix style
idegtiarenko Feb 18, 2026
e2e4643
support enrich
idegtiarenko Feb 19, 2026
209aefb
completion
idegtiarenko Feb 19, 2026
259a279
categorize
idegtiarenko Feb 19, 2026
32333f6
TEXT_EMBEDDING_FUNCTION
idegtiarenko Feb 19, 2026
6f318af
final cleanup
idegtiarenko Feb 19, 2026
cd21d36
final cleanup
idegtiarenko Feb 19, 2026
77bb0da
Merge branch 'main' into csv_it
idegtiarenko Feb 20, 2026
81351e1
[CI] Auto commit changes from spotless
Feb 20, 2026
567c850
map enrich policies
idegtiarenko Feb 20, 2026
e9b0855
map views
idegtiarenko Feb 20, 2026
51ff02d
fix compilation
idegtiarenko Feb 20, 2026
67c7131
Merge branch 'main' into csv_it
idegtiarenko Feb 23, 2026
58183b1
Merge branch 'main' into csv_it
idegtiarenko Feb 23, 2026
ac72827
upd
idegtiarenko Feb 23, 2026
e24c2a0
upd
idegtiarenko Feb 23, 2026
529b565
Merge branch 'main' into csv_it
idegtiarenko Feb 23, 2026
c6474d7
Merge branch 'main' into csv_it
idegtiarenko Feb 24, 2026
016d753
add javadoc
idegtiarenko Feb 26, 2026
5a799b9
Merge branch 'main' into csv_it
idegtiarenko Feb 26, 2026
1cd134c
Merge branch 'main' into csv_it
idegtiarenko Feb 26, 2026
434d357
fix merge
idegtiarenko Feb 26, 2026
fe22bd4
Merge branch 'main' into csv_it
idegtiarenko Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions x-pack/plugin/esql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ dependencies {
internalClusterTestImplementation project(xpackModule('inference:qa:test-service-plugin'))
internalClusterTestImplementation(testArtifact(project(xpackModule('inference'))))
internalClusterTestImplementation project(path: xpackModule('mapper-constant-keyword'))
internalClusterTestImplementation project(xpackModule('analytics'))
internalClusterTestImplementation project(xpackModule('spatial'))
internalClusterTestImplementation project(xpackModule('mapper-unsigned-long'))
internalClusterTestImplementation project(xpackModule('wildcard'))
internalClusterTestImplementation project(xpackModule('mapper-version'))
internalClusterTestImplementation project(xpackModule('mapper-aggregate-metric'))
}

tasks.named('splitPackagesAudit').configure {
Expand Down Expand Up @@ -288,6 +294,10 @@ tasks.named("test").configure {
}
}

tasks.named('internalClusterTestTestingConventions').configure {
baseClass 'org.elasticsearch.test.ESTestCase'
}

// This is similar to the test task above, but needed for the LookupJoinTypesIT which runs in the internalClusterTest task
// and generates a types table for the LOOKUP JOIN command. It is possible in future we might have move tests that do this.
tasks.named("internalClusterTest").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import static java.util.stream.Collectors.toSet;
import static org.elasticsearch.xpack.esql.CsvSpecReader.specParser;
import static org.elasticsearch.xpack.esql.CsvTestUtils.isEnabled;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.CSV_DATASET_MAP;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.CSV_DATASET;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.ENRICH_POLICIES;
import static org.elasticsearch.xpack.esql.EsqlTestUtils.classpathResources;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.COMPLETION;
Expand Down Expand Up @@ -262,15 +262,18 @@ protected RestClient buildClient(Settings settings, HttpHost[] localHosts) throw
public static final List<String> METADATA_INDICES = List.of("employees", "apps", "ul_logs");

// These are lookup indices, we want them on both remotes and locals
public static final Set<String> LOOKUP_INDICES = CSV_DATASET_MAP.values()
public static final Set<String> LOOKUP_INDICES = CSV_DATASET.values()
.stream()
.filter(td -> td.settingFileName() != null && td.settingFileName().equals("lookup-settings.json"))
.map(CsvTestsDataLoader.TestDataset::indexName)
.collect(toSet());

public static final Set<String> LOOKUP_ENDPOINTS = LOOKUP_INDICES.stream().map(i -> "/" + i + "/_bulk").collect(toSet());

public static final Set<String> ENRICH_ENDPOINTS = ENRICH_POLICIES.stream().map(p -> "/" + p.index() + "/_bulk").collect(toSet());
public static final Set<String> ENRICH_ENDPOINTS = ENRICH_POLICIES.values()
.stream()
.map(p -> "/" + p.index() + "/_bulk")
.collect(toSet());

/**
* Creates a new mock client that dispatches every request to both the local and remote clusters, excluding _bulk, _query,
Expand Down Expand Up @@ -355,7 +358,7 @@ static CsvSpecReader.CsvTestCase convertToRemoteIndices(CsvSpecReader.CsvTestCas
boolean onlyRemotes = canUseRemoteIndicesOnly() && randomBoolean();
// Check if query contains enrich source indices - these are loaded into both clusters,
// so we should use onlyRemotes=true to avoid duplicates
var enrichSourceIndices = ENRICH_POLICIES.stream().map(CsvTestsDataLoader.EnrichConfig::index).collect(toSet());
var enrichSourceIndices = ENRICH_POLICIES.values().stream().map(CsvTestsDataLoader.EnrichConfig::index).collect(toSet());
if (onlyRemotes == false && EsqlTestUtils.queryContainsIndices(query, enrichSourceIndices)) {
onlyRemotes = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public static void wipeTestData() throws IOException {
throw e;
}
}
for (CsvTestsDataLoader.EnrichConfig enrich : CsvTestsDataLoader.ENRICH_POLICIES) {
for (CsvTestsDataLoader.EnrichConfig enrich : CsvTestsDataLoader.ENRICH_POLICIES.values()) {
try {
adminClient().performRequest(new Request("DELETE", "/_enrich/policy/" + enrich.policyName()));
} catch (ResponseException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.CSV_DATASET_MAP;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.CSV_DATASET;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.ENRICH_POLICIES;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.availableDatasetsForEs;
import static org.elasticsearch.xpack.esql.CsvTestsDataLoader.loadDataSetIntoEs;
Expand Down Expand Up @@ -172,7 +173,7 @@ public abstract class GenerativeRestTest extends ESRestTestCase implements Query

@Before
public void setup() throws IOException {
if (indexExists(CSV_DATASET_MAP.keySet().iterator().next()) == false) {
if (indexExists(CSV_DATASET.keySet().iterator().next()) == false) {
loadDataSetIntoEs(client(), true, supportsSourceFieldMapping(), false);
}
}
Expand All @@ -198,7 +199,7 @@ public static void wipeTestData() throws IOException {
public void test() throws IOException {
List<String> indices = availableIndices();
List<LookupIdx> lookupIndices = lookupIndices();
List<CsvTestsDataLoader.EnrichConfig> policies = availableEnrichPolicies();
Collection<CsvTestsDataLoader.EnrichConfig> policies = ENRICH_POLICIES.values();
CommandGenerator.QuerySchema mappingInfo = new CommandGenerator.QuerySchema(indices, lookupIndices, policies);

for (int i = 0; i < ITERATIONS; i++) {
Expand Down Expand Up @@ -501,8 +502,4 @@ private List<LookupIdx> lookupIndices() {
result.add(new LookupIdx("multi_column_joinable_lookup", multiColumnJoinableLookupKeys));
return result;
}

List<CsvTestsDataLoader.EnrichConfig> availableEnrichPolicies() {
return ENRICH_POLICIES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.elasticsearch.xpack.esql.action.ResponseValueUtils;
import org.elasticsearch.xpack.esql.core.type.DataType;
import org.elasticsearch.xpack.esql.core.util.StringUtils;
import org.elasticsearch.xpack.esql.session.Configuration;
import org.elasticsearch.xpack.esql.type.EsqlDataTypeConverter;
import org.supercsv.io.CsvListReader;
import org.supercsv.prefs.CsvPreference;
Expand All @@ -59,6 +58,7 @@
import java.io.StringReader;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -680,15 +680,15 @@ public boolean sortMultiValues() {
}

record ActualResults(
Configuration configuration,
ZoneId zoneId,
List<String> columnNames,
List<Type> columnTypes,
List<DataType> dataTypes,
List<Page> pages,
Map<String, List<String>> responseHeaders
) {
List<List<Object>> values() {
return EsqlTestUtils.getValuesList(ResponseValueUtils.pagesToValues(dataTypes(), pages, configuration.zoneId()));
return EsqlTestUtils.getValuesList(ResponseValueUtils.pagesToValues(dataTypes(), pages, zoneId));
}
}

Expand Down
Loading