Skip to content

Commit 10d638c

Browse files
committed
fix merge issues
1 parent 890368a commit 10d638c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package org.elasticsearch.xpack.esql.approximate;
99

1010
import org.apache.lucene.util.SetOnce;
11+
import org.elasticsearch.TransportVersion;
1112
import org.elasticsearch.action.ActionListener;
1213
import org.elasticsearch.common.breaker.CircuitBreaker;
1314
import org.elasticsearch.common.unit.ByteSizeValue;
@@ -19,7 +20,6 @@
1920
import org.elasticsearch.compute.test.MockBlockFactory;
2021
import org.elasticsearch.test.ESTestCase;
2122
import org.elasticsearch.xpack.esql.VerificationException;
22-
import org.elasticsearch.xpack.esql.analysis.Analyzer;
2323
import org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils;
2424
import org.elasticsearch.xpack.esql.core.expression.FoldContext;
2525
import org.elasticsearch.xpack.esql.core.expression.Literal;
@@ -55,9 +55,8 @@
5555
public class ApproximateTests extends ESTestCase {
5656

5757
private static final EsqlParser parser = new EsqlParser();
58-
private static final Analyzer analyzer = AnalyzerTestUtils.defaultAnalyzer();
5958
private static final LogicalPlanPreOptimizer preOptimizer = new LogicalPlanPreOptimizer(
60-
new LogicalPreOptimizerContext(FoldContext.small(), mock(InferenceService.class))
59+
new LogicalPreOptimizerContext(FoldContext.small(), mock(InferenceService.class), TransportVersion.current())
6160
);
6261
private static final CircuitBreaker breaker = newLimitedBreaker(ByteSizeValue.ofGb(1));
6362
private static final BigArrays bigArrays = new MockBigArrays(PageCacheRecycler.NON_RECYCLING_INSTANCE, ByteSizeValue.ofGb(1));
@@ -367,7 +366,7 @@ private LogicalPlan getLogicalPlan(String query) throws Exception {
367366
SetOnce<LogicalPlan> resultHolder = new SetOnce<>();
368367
SetOnce<Exception> exceptionHolder = new SetOnce<>();
369368
LogicalPlan plan = parser.createStatement(query, new QueryParams());
370-
plan = analyzer.analyze(plan);
369+
plan = AnalyzerTestUtils.defaultAnalyzer().analyze(plan);
371370
plan.setAnalyzed();
372371
preOptimizer.preOptimize(plan, ActionListener.wrap(resultHolder::set, exceptionHolder::set));
373372
if (exceptionHolder.get() != null) {

0 commit comments

Comments
 (0)