|
28 | 28 | import org.elasticsearch.xpack.esql.core.type.DataType;
|
29 | 29 | import org.elasticsearch.xpack.esql.core.type.EsField;
|
30 | 30 | import org.elasticsearch.xpack.esql.expression.Order;
|
| 31 | +import org.elasticsearch.xpack.esql.expression.Partition; |
31 | 32 | import org.elasticsearch.xpack.esql.expression.function.scalar.spatial.StDistance;
|
32 | 33 | import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add;
|
33 | 34 | import org.elasticsearch.xpack.esql.optimizer.LocalPhysicalOptimizerContext;
|
@@ -484,6 +485,7 @@ static class TestPhysicalPlanBuilder {
|
484 | 485 | private final LinkedHashMap<String, MetadataAttribute> metadata;
|
485 | 486 | private IndexMode indexMode;
|
486 | 487 | private final List<Alias> aliases = new ArrayList<>();
|
| 488 | + private final List<Partition> partitions = new ArrayList<>(); |
487 | 489 | private final List<Order> orders = new ArrayList<>();
|
488 | 490 | private int limit = Integer.MAX_VALUE;
|
489 | 491 |
|
@@ -586,7 +588,14 @@ public TopNExec build() {
|
586 | 588 | if (aliases.isEmpty() == false) {
|
587 | 589 | child = new EvalExec(Source.EMPTY, child, aliases);
|
588 | 590 | }
|
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 | + ); |
590 | 599 | }
|
591 | 600 |
|
592 | 601 | public TestPhysicalPlanBuilder asTimeSeries() {
|
|
0 commit comments