Skip to content

Commit b11c805

Browse files
committed
Checkout PushTopNToSourceTests.java from dep
1 parent 07fb734 commit b11c805

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/rules/physical/local/PushTopNToSourceTests.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.elasticsearch.xpack.esql.core.type.DataType;
2929
import org.elasticsearch.xpack.esql.core.type.EsField;
3030
import org.elasticsearch.xpack.esql.expression.Order;
31+
import org.elasticsearch.xpack.esql.expression.Partition;
3132
import org.elasticsearch.xpack.esql.expression.function.scalar.spatial.StDistance;
3233
import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add;
3334
import org.elasticsearch.xpack.esql.optimizer.LocalPhysicalOptimizerContext;
@@ -484,6 +485,7 @@ static class TestPhysicalPlanBuilder {
484485
private final LinkedHashMap<String, MetadataAttribute> metadata;
485486
private IndexMode indexMode;
486487
private final List<Alias> aliases = new ArrayList<>();
488+
private final List<Partition> partitions = new ArrayList<>();
487489
private final List<Order> orders = new ArrayList<>();
488490
private int limit = Integer.MAX_VALUE;
489491

@@ -586,7 +588,14 @@ public TopNExec build() {
586588
if (aliases.isEmpty() == false) {
587589
child = new EvalExec(Source.EMPTY, child, aliases);
588590
}
589-
return new TopNExec(Source.EMPTY, child, null, orders, new Literal(Source.EMPTY, limit, INTEGER), randomEstimatedRowSize());
591+
return new TopNExec(
592+
Source.EMPTY,
593+
child,
594+
partitions,
595+
orders,
596+
new Literal(Source.EMPTY, limit, INTEGER),
597+
randomEstimatedRowSize()
598+
);
590599
}
591600

592601
public TestPhysicalPlanBuilder asTimeSeries() {

0 commit comments

Comments
 (0)