From c4e312eecc7ba7024857e778279f44400f7777e1 Mon Sep 17 00:00:00 2001 From: Mark Tozzi Date: Fri, 19 Sep 2025 11:44:29 -0400 Subject: [PATCH 1/3] extract base class for physical plan tests --- ...stractLocalPhysicalPlanOptimizerTests.java | 149 ++++++++++++++++++ ...IgnoreNullMetricsPhysicalPlannerTests.java | 2 +- .../LocalPhysicalPlanOptimizerTests.java | 93 +---------- .../ReplaceRoundToWithQueryAndTagsTests.java | 3 +- 4 files changed, 154 insertions(+), 93 deletions(-) create mode 100644 x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/AbstractLocalPhysicalPlanOptimizerTests.java diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/AbstractLocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/AbstractLocalPhysicalPlanOptimizerTests.java new file mode 100644 index 0000000000000..7b111e50890c5 --- /dev/null +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/AbstractLocalPhysicalPlanOptimizerTests.java @@ -0,0 +1,149 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +package org.elasticsearch.xpack.esql.optimizer; + +import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; + +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.core.Tuple; +import org.elasticsearch.index.IndexMode; +import org.elasticsearch.index.mapper.MapperServiceTestCase; +import org.elasticsearch.index.query.QueryBuilder; +import org.elasticsearch.license.XPackLicenseState; +import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.xpack.core.enrich.EnrichPolicy; +import org.elasticsearch.xpack.esql.EsqlTestUtils; +import org.elasticsearch.xpack.esql.analysis.Analyzer; +import org.elasticsearch.xpack.esql.analysis.AnalyzerContext; +import org.elasticsearch.xpack.esql.analysis.EnrichResolution; +import org.elasticsearch.xpack.esql.analysis.Verifier; +import org.elasticsearch.xpack.esql.core.tree.Source; +import org.elasticsearch.xpack.esql.core.type.DataType; +import org.elasticsearch.xpack.esql.core.type.EsField; +import org.elasticsearch.xpack.esql.enrich.ResolvedEnrichPolicy; +import org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry; +import org.elasticsearch.xpack.esql.index.EsIndex; +import org.elasticsearch.xpack.esql.index.IndexResolution; +import org.elasticsearch.xpack.esql.plan.logical.Enrich; +import org.elasticsearch.xpack.esql.planner.FilterTests; +import org.elasticsearch.xpack.esql.plugin.QueryPragmas; +import org.elasticsearch.xpack.esql.session.Configuration; +import org.elasticsearch.xpack.esql.telemetry.Metrics; +import org.junit.Before; + +import java.util.List; +import java.util.Map; + +import static org.elasticsearch.xpack.esql.EsqlTestUtils.TEST_VERIFIER; +import static org.elasticsearch.xpack.esql.EsqlTestUtils.configuration; +import static org.elasticsearch.xpack.esql.EsqlTestUtils.emptyInferenceResolution; +import static org.elasticsearch.xpack.esql.EsqlTestUtils.loadMapping; +import static org.elasticsearch.xpack.esql.EsqlTestUtils.withDefaultLimitWarning; +import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.defaultLookupResolution; + +public class AbstractLocalPhysicalPlanOptimizerTests extends MapperServiceTestCase { + protected final Configuration config; + protected TestPlannerOptimizer plannerOptimizer; + protected TestPlannerOptimizer plannerOptimizerDateDateNanosUnionTypes; + protected TestPlannerOptimizer plannerOptimizerTimeSeries; + private Analyzer timeSeriesAnalyzer; + + private static final String PARAM_FORMATTING = "%1$s"; + + @ParametersFactory(argumentFormatting = PARAM_FORMATTING) + public static List readScriptSpec() { + return settings().stream().map(t -> { + var settings = Settings.builder().loadFromMap(t.v2()).build(); + return new Object[] { t.v1(), configuration(new QueryPragmas(settings)) }; + }).toList(); + } + + private static List>> settings() { + return List.of(new Tuple<>("default", Map.of())); + } + + protected static QueryBuilder wrapWithSingleQuery(String query, QueryBuilder inner, String fieldName, Source source) { + return FilterTests.singleValueQuery(query, inner, fieldName, source); + } + + public AbstractLocalPhysicalPlanOptimizerTests(String name, Configuration config) { + this.config = config; + } + + @Before + public void init() { + EnrichResolution enrichResolution = new EnrichResolution(); + enrichResolution.addResolvedPolicy( + "foo", + Enrich.Mode.ANY, + new ResolvedEnrichPolicy( + "fld", + EnrichPolicy.MATCH_TYPE, + List.of("a", "b"), + Map.of("", "idx"), + Map.ofEntries( + Map.entry("a", new EsField("a", DataType.INTEGER, Map.of(), true, EsField.TimeSeriesFieldType.NONE)), + Map.entry("b", new EsField("b", DataType.LONG, Map.of(), true, EsField.TimeSeriesFieldType.NONE)) + ) + ) + ); + plannerOptimizer = new TestPlannerOptimizer(config, makeAnalyzer("mapping-basic.json", enrichResolution)); + var timeSeriesMapping = loadMapping("k8s-mappings.json"); + var timeSeriesIndex = IndexResolution.valid(new EsIndex("k8s", timeSeriesMapping, Map.of("k8s", IndexMode.TIME_SERIES))); + timeSeriesAnalyzer = new Analyzer( + new AnalyzerContext( + EsqlTestUtils.TEST_CFG, + new EsqlFunctionRegistry(), + timeSeriesIndex, + enrichResolution, + emptyInferenceResolution() + ), + TEST_VERIFIER + ); + plannerOptimizerTimeSeries = new TestPlannerOptimizer(config, timeSeriesAnalyzer); + } + + private Analyzer makeAnalyzer(String mappingFileName, EnrichResolution enrichResolution) { + var mapping = loadMapping(mappingFileName); + EsIndex test = new EsIndex("test", mapping, Map.of("test", IndexMode.STANDARD)); + IndexResolution getIndexResult = IndexResolution.valid(test); + + return new Analyzer( + new AnalyzerContext( + config, + new EsqlFunctionRegistry(), + getIndexResult, + defaultLookupResolution(), + enrichResolution, + emptyInferenceResolution() + ), + new Verifier(new Metrics(new EsqlFunctionRegistry()), new XPackLicenseState(() -> 0L)) + ); + } + + protected Analyzer makeAnalyzer(String mappingFileName) { + return makeAnalyzer(mappingFileName, new EnrichResolution()); + } + + protected Analyzer makeAnalyzer(IndexResolution indexResolution) { + return new Analyzer( + new AnalyzerContext(config, new EsqlFunctionRegistry(), indexResolution, new EnrichResolution(), emptyInferenceResolution()), + new Verifier(new Metrics(new EsqlFunctionRegistry()), new XPackLicenseState(() -> 0L)) + ); + } + + /** + * This exempts the warning about adding the automatic limit from the warnings check in + * {@link ESTestCase#ensureNoWarnings()} + */ + @Override + protected List filteredWarnings() { + return withDefaultLimitWarning(super.filteredWarnings()); + } + +} diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/IgnoreNullMetricsPhysicalPlannerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/IgnoreNullMetricsPhysicalPlannerTests.java index 50f7d53eaa67c..78f8f8d3a0161 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/IgnoreNullMetricsPhysicalPlannerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/IgnoreNullMetricsPhysicalPlannerTests.java @@ -22,7 +22,7 @@ * Tests for the {@link org.elasticsearch.xpack.esql.optimizer.rules.logical.local.IgnoreNullMetrics} planner rule, to * verify that the filters are being pushed to Lucene. */ -public class IgnoreNullMetricsPhysicalPlannerTests extends LocalPhysicalPlanOptimizerTests { +public class IgnoreNullMetricsPhysicalPlannerTests extends AbstractLocalPhysicalPlanOptimizerTests { public IgnoreNullMetricsPhysicalPlannerTests(String name, Configuration config) { super(name, config); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java index affe9c26cc67b..6c74a1adae750 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java @@ -152,7 +152,7 @@ import static org.hamcrest.Matchers.nullValue; //@TestLogging(value = "org.elasticsearch.xpack.esql:TRACE,org.elasticsearch.compute:TRACE", reason = "debug") -public class LocalPhysicalPlanOptimizerTests extends MapperServiceTestCase { +public class LocalPhysicalPlanOptimizerTests extends AbstractLocalPhysicalPlanOptimizerTests { public static final List UNNECESSARY_CASTING_DATA_TYPES = List.of( DataType.BOOLEAN, @@ -162,7 +162,6 @@ public class LocalPhysicalPlanOptimizerTests extends MapperServiceTestCase { DataType.KEYWORD, DataType.TEXT ); - private static final String PARAM_FORMATTING = "%1$s"; /** * Estimated size of a keyword field in bytes. @@ -171,11 +170,6 @@ public class LocalPhysicalPlanOptimizerTests extends MapperServiceTestCase { public static final String MATCH_OPERATOR_QUERY = "from test | where %s:%s"; public static final String MATCH_FUNCTION_QUERY = "from test | where match(%s, %s)"; - protected TestPlannerOptimizer plannerOptimizer; - private TestPlannerOptimizer plannerOptimizerDateDateNanosUnionTypes; - private Analyzer timeSeriesAnalyzer; - protected TestPlannerOptimizer plannerOptimizerTimeSeries; - private final Configuration config; private final SearchStats IS_SV_STATS = new TestSearchStats() { @Override public boolean isSingleValue(FieldAttribute.FieldName field) { @@ -195,82 +189,8 @@ public String constantValue(FieldAttribute.FieldName name) { } }; - @ParametersFactory(argumentFormatting = PARAM_FORMATTING) - public static List readScriptSpec() { - return settings().stream().map(t -> { - var settings = Settings.builder().loadFromMap(t.v2()).build(); - return new Object[] { t.v1(), configuration(new QueryPragmas(settings)) }; - }).toList(); - } - - private static List>> settings() { - return asList(new Tuple<>("default", Map.of())); - } - public LocalPhysicalPlanOptimizerTests(String name, Configuration config) { - this.config = config; - } - - @Before - public void init() { - EnrichResolution enrichResolution = new EnrichResolution(); - enrichResolution.addResolvedPolicy( - "foo", - Enrich.Mode.ANY, - new ResolvedEnrichPolicy( - "fld", - EnrichPolicy.MATCH_TYPE, - List.of("a", "b"), - Map.of("", "idx"), - Map.ofEntries( - Map.entry("a", new EsField("a", DataType.INTEGER, Map.of(), true, EsField.TimeSeriesFieldType.NONE)), - Map.entry("b", new EsField("b", DataType.LONG, Map.of(), true, EsField.TimeSeriesFieldType.NONE)) - ) - ) - ); - plannerOptimizer = new TestPlannerOptimizer(config, makeAnalyzer("mapping-basic.json", enrichResolution)); - var timeSeriesMapping = loadMapping("k8s-mappings.json"); - var timeSeriesIndex = IndexResolution.valid(new EsIndex("k8s", timeSeriesMapping, Map.of("k8s", IndexMode.TIME_SERIES))); - timeSeriesAnalyzer = new Analyzer( - new AnalyzerContext( - EsqlTestUtils.TEST_CFG, - new EsqlFunctionRegistry(), - timeSeriesIndex, - enrichResolution, - emptyInferenceResolution() - ), - TEST_VERIFIER - ); - plannerOptimizerTimeSeries = new TestPlannerOptimizer(config, timeSeriesAnalyzer); - } - - private Analyzer makeAnalyzer(String mappingFileName, EnrichResolution enrichResolution) { - var mapping = loadMapping(mappingFileName); - EsIndex test = new EsIndex("test", mapping, Map.of("test", IndexMode.STANDARD)); - IndexResolution getIndexResult = IndexResolution.valid(test); - - return new Analyzer( - new AnalyzerContext( - config, - new EsqlFunctionRegistry(), - getIndexResult, - defaultLookupResolution(), - enrichResolution, - emptyInferenceResolution() - ), - new Verifier(new Metrics(new EsqlFunctionRegistry()), new XPackLicenseState(() -> 0L)) - ); - } - - protected Analyzer makeAnalyzer(String mappingFileName) { - return makeAnalyzer(mappingFileName, new EnrichResolution()); - } - - private Analyzer makeAnalyzer(IndexResolution indexResolution) { - return new Analyzer( - new AnalyzerContext(config, new EsqlFunctionRegistry(), indexResolution, new EnrichResolution(), emptyInferenceResolution()), - new Verifier(new Metrics(new EsqlFunctionRegistry()), new XPackLicenseState(() -> 0L)) - ); + super(name, config); } /** @@ -2585,10 +2505,6 @@ private boolean isMultiTypeEsField(Expression e) { return e instanceof FieldAttribute fa && fa.field() instanceof MultiTypeEsField; } - protected static QueryBuilder wrapWithSingleQuery(String query, QueryBuilder inner, String fieldName, Source source) { - return FilterTests.singleValueQuery(query, inner, fieldName, source); - } - private Stat queryStatsFor(PhysicalPlan plan) { var limit = as(plan, LimitExec.class); var agg = as(limit.child(), AggregateExec.class); @@ -2600,11 +2516,6 @@ private Stat queryStatsFor(PhysicalPlan plan) { return stat; } - @Override - protected List filteredWarnings() { - return withDefaultLimitWarning(super.filteredWarnings()); - } - private static KqlQueryBuilder kqlQueryBuilder(String query) { return new KqlQueryBuilder(query); } diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java index beef7ee4857a3..ba6f7547cf6bf 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java @@ -27,6 +27,7 @@ import org.elasticsearch.xpack.esql.expression.function.grouping.Bucket; import org.elasticsearch.xpack.esql.expression.function.scalar.date.DateTrunc; import org.elasticsearch.xpack.esql.expression.function.scalar.math.RoundTo; +import org.elasticsearch.xpack.esql.optimizer.AbstractLocalPhysicalPlanOptimizerTests; import org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests; import org.elasticsearch.xpack.esql.optimizer.TestPlannerOptimizer; import org.elasticsearch.xpack.esql.plan.logical.EsRelation; @@ -70,7 +71,7 @@ import static org.hamcrest.Matchers.is; //@TestLogging(value = "org.elasticsearch.xpack.esql:TRACE", reason = "debug") -public class ReplaceRoundToWithQueryAndTagsTests extends LocalPhysicalPlanOptimizerTests { +public class ReplaceRoundToWithQueryAndTagsTests extends AbstractLocalPhysicalPlanOptimizerTests { public ReplaceRoundToWithQueryAndTagsTests(String name, Configuration config) { super(name, config); From d60928d49dc9b2ae28cf7fcf69cbb930123dd8c7 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Fri, 19 Sep 2025 17:49:03 +0000 Subject: [PATCH 2/3] [CI] Auto commit changes from spotless --- .../LocalPhysicalPlanOptimizerTests.java | 26 ------------------- .../ReplaceRoundToWithQueryAndTagsTests.java | 1 - 2 files changed, 27 deletions(-) diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java index 6c74a1adae750..37014a6735ad9 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java @@ -7,16 +7,11 @@ package org.elasticsearch.xpack.esql.optimizer; -import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; - import org.apache.lucene.search.IndexSearcher; import org.elasticsearch.common.network.NetworkAddress; -import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.Fuzziness; -import org.elasticsearch.core.Tuple; import org.elasticsearch.index.IndexMode; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.mapper.MapperServiceTestCase; import org.elasticsearch.index.mapper.ParsedDocument; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.MatchQueryBuilder; @@ -26,19 +21,14 @@ import org.elasticsearch.index.query.QueryStringQueryBuilder; import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.index.query.SearchExecutionContext; -import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.search.vectors.KnnVectorQueryBuilder; import org.elasticsearch.search.vectors.RescoreVectorBuilder; import org.elasticsearch.test.VersionUtils; -import org.elasticsearch.xpack.core.enrich.EnrichPolicy; import org.elasticsearch.xpack.esql.EsqlTestUtils; import org.elasticsearch.xpack.esql.EsqlTestUtils.TestSearchStats; import org.elasticsearch.xpack.esql.VerificationException; import org.elasticsearch.xpack.esql.action.EsqlCapabilities; import org.elasticsearch.xpack.esql.analysis.Analyzer; -import org.elasticsearch.xpack.esql.analysis.AnalyzerContext; -import org.elasticsearch.xpack.esql.analysis.EnrichResolution; -import org.elasticsearch.xpack.esql.analysis.Verifier; import org.elasticsearch.xpack.esql.core.expression.Alias; import org.elasticsearch.xpack.esql.core.expression.Attribute; import org.elasticsearch.xpack.esql.core.expression.Expression; @@ -50,12 +40,9 @@ import org.elasticsearch.xpack.esql.core.expression.ReferenceAttribute; import org.elasticsearch.xpack.esql.core.tree.Source; import org.elasticsearch.xpack.esql.core.type.DataType; -import org.elasticsearch.xpack.esql.core.type.EsField; import org.elasticsearch.xpack.esql.core.type.MultiTypeEsField; import org.elasticsearch.xpack.esql.core.util.Holder; -import org.elasticsearch.xpack.esql.enrich.ResolvedEnrichPolicy; import org.elasticsearch.xpack.esql.expression.Order; -import org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry; import org.elasticsearch.xpack.esql.expression.function.UnsupportedAttribute; import org.elasticsearch.xpack.esql.expression.function.aggregate.Count; import org.elasticsearch.xpack.esql.expression.function.aggregate.Min; @@ -69,11 +56,9 @@ import org.elasticsearch.xpack.esql.expression.predicate.logical.Or; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThan; import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.GreaterThanOrEqual; -import org.elasticsearch.xpack.esql.index.EsIndex; import org.elasticsearch.xpack.esql.index.IndexResolution; import org.elasticsearch.xpack.esql.optimizer.rules.logical.ExtractAggregateCommonFilter; import org.elasticsearch.xpack.esql.parser.ParsingException; -import org.elasticsearch.xpack.esql.plan.logical.Enrich; import org.elasticsearch.xpack.esql.plan.logical.EsRelation; import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.esql.plan.physical.AggregateExec; @@ -95,19 +80,15 @@ import org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan; import org.elasticsearch.xpack.esql.plan.physical.ProjectExec; import org.elasticsearch.xpack.esql.plan.physical.TopNExec; -import org.elasticsearch.xpack.esql.planner.FilterTests; import org.elasticsearch.xpack.esql.plugin.EsqlFlags; -import org.elasticsearch.xpack.esql.plugin.QueryPragmas; import org.elasticsearch.xpack.esql.querydsl.query.SingleValueQuery; import org.elasticsearch.xpack.esql.rule.Rule; import org.elasticsearch.xpack.esql.rule.RuleExecutor; import org.elasticsearch.xpack.esql.session.Configuration; import org.elasticsearch.xpack.esql.stats.SearchContextStats; import org.elasticsearch.xpack.esql.stats.SearchStats; -import org.elasticsearch.xpack.esql.telemetry.Metrics; import org.elasticsearch.xpack.esql.type.EsqlDataTypeConverter; import org.elasticsearch.xpack.kql.query.KqlQueryBuilder; -import org.junit.Before; import java.io.IOException; import java.util.ArrayList; @@ -120,7 +101,6 @@ import java.util.function.BiFunction; import java.util.function.Function; -import static java.util.Arrays.asList; import static org.elasticsearch.compute.aggregation.AggregatorMode.FINAL; import static org.elasticsearch.index.query.QueryBuilders.boolQuery; import static org.elasticsearch.index.query.QueryBuilders.existsQuery; @@ -128,14 +108,8 @@ import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.elasticsearch.index.query.QueryBuilders.termsQuery; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.TEST_VERIFIER; import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.configuration; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.emptyInferenceResolution; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.loadMapping; import static org.elasticsearch.xpack.esql.EsqlTestUtils.unboundLogicalOptimizerContext; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.withDefaultLimitWarning; -import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.defaultLookupResolution; import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.indexWithDateDateNanosUnionType; import static org.elasticsearch.xpack.esql.core.querydsl.query.Query.unscore; import static org.elasticsearch.xpack.esql.core.type.DataType.DATE_NANOS; diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java index ba6f7547cf6bf..0558cebff452e 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/ReplaceRoundToWithQueryAndTagsTests.java @@ -28,7 +28,6 @@ import org.elasticsearch.xpack.esql.expression.function.scalar.date.DateTrunc; import org.elasticsearch.xpack.esql.expression.function.scalar.math.RoundTo; import org.elasticsearch.xpack.esql.optimizer.AbstractLocalPhysicalPlanOptimizerTests; -import org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests; import org.elasticsearch.xpack.esql.optimizer.TestPlannerOptimizer; import org.elasticsearch.xpack.esql.plan.logical.EsRelation; import org.elasticsearch.xpack.esql.plan.physical.AggregateExec; From 33309fb1fdf7d2563fb0615b8c62ebab0184454e Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Mon, 29 Sep 2025 16:27:53 +0000 Subject: [PATCH 3/3] [CI] Auto commit changes from spotless --- .../xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java index 7d3acfe3c72e3..c93bfe8905217 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java @@ -109,7 +109,6 @@ import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.elasticsearch.index.query.QueryBuilders.termsQuery; import static org.elasticsearch.xpack.esql.EsqlTestUtils.TEST_PLANNER_SETTINGS; -import static org.elasticsearch.xpack.esql.EsqlTestUtils.TEST_VERIFIER; import static org.elasticsearch.xpack.esql.EsqlTestUtils.as; import static org.elasticsearch.xpack.esql.EsqlTestUtils.unboundLogicalOptimizerContext; import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.indexWithDateDateNanosUnionType;