diff --git a/core/trino-main/src/main/java/io/trino/operator/OutputSpoolingOperatorFactory.java b/core/trino-main/src/main/java/io/trino/operator/OutputSpoolingOperatorFactory.java index a25b3ff6dbcd..2b76fee6cc36 100644 --- a/core/trino-main/src/main/java/io/trino/operator/OutputSpoolingOperatorFactory.java +++ b/core/trino-main/src/main/java/io/trino/operator/OutputSpoolingOperatorFactory.java @@ -23,7 +23,6 @@ import io.trino.server.protocol.OutputColumn; import io.trino.server.protocol.spooling.QueryDataEncoder; import io.trino.server.protocol.spooling.SpooledBlock; -import io.trino.server.protocol.spooling.SpoolingConfig; import io.trino.spi.Mergeable; import io.trino.spi.Page; import io.trino.spi.block.Block; @@ -73,18 +72,16 @@ public class OutputSpoolingOperatorFactory private final Map operatorLayout; private final SpoolingManager spoolingManager; private final QueryDataEncoder queryDataEncoder; - private final SpoolingConfig spoolingConfig; private boolean closed; - public OutputSpoolingOperatorFactory(int operatorId, PlanNodeId planNodeId, Map operatorLayout, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, SpoolingConfig spoolingConfig) + public OutputSpoolingOperatorFactory(int operatorId, PlanNodeId planNodeId, Map operatorLayout, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager) { this.operatorId = operatorId; this.planNodeId = requireNonNull(planNodeId, "planNodeId is null"); this.operatorLayout = ImmutableMap.copyOf(requireNonNull(operatorLayout, "layout is null")); this.queryDataEncoder = requireNonNull(queryDataEncoder, "queryDataEncoder is null"); this.spoolingManager = requireNonNull(spoolingManager, "spoolingManager is null"); - this.spoolingConfig = requireNonNull(spoolingConfig, "spoolingConfig is null"); } public static List spooledOutputLayout(OutputNode outputNode, Map layout) @@ -121,7 +118,7 @@ public Operator createOperator(DriverContext driverContext) { checkState(!closed, "Factory is already closed"); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, OutputSpoolingOperator.class.getSimpleName()); - return new OutputSpoolingOperator(operatorContext, queryDataEncoder, spoolingManager, spoolingConfig, operatorLayout); + return new OutputSpoolingOperator(operatorContext, queryDataEncoder, spoolingManager, operatorLayout); } @Override @@ -133,7 +130,7 @@ public void noMoreOperators() @Override public OperatorFactory duplicate() { - return new OutputSpoolingOperatorFactory(operatorId, planNodeId, operatorLayout, queryDataEncoder, spoolingManager, spoolingConfig); + return new OutputSpoolingOperatorFactory(operatorId, planNodeId, operatorLayout, queryDataEncoder, spoolingManager); } static class OutputSpoolingOperator @@ -161,7 +158,7 @@ enum State private Page outputPage; - public OutputSpoolingOperator(OperatorContext operatorContext, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, SpoolingConfig spoolingConfig, Map layout) + public OutputSpoolingOperator(OperatorContext operatorContext, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, Map layout) { this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); this.controller = new OutputSpoolingController( diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java b/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java index cbdf2c3203ac..34edfb87166f 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/LocalExecutionPlanner.java @@ -157,7 +157,6 @@ import io.trino.plugin.base.MappedRecordSet; import io.trino.server.protocol.spooling.QueryDataEncoder; import io.trino.server.protocol.spooling.QueryDataEncoders; -import io.trino.server.protocol.spooling.SpoolingConfig; import io.trino.spi.Page; import io.trino.spi.PageBuilder; import io.trino.spi.TrinoException; @@ -432,7 +431,6 @@ public class LocalExecutionPlanner private final SpillerFactory spillerFactory; private final QueryDataEncoders encoders; private final Optional spoolingManager; - private final Optional spoolingConfig; private final SingleStreamSpillerFactory singleStreamSpillerFactory; private final PartitioningSpillerFactory partitioningSpillerFactory; private final PagesIndex.Factory pagesIndexFactory; @@ -487,7 +485,6 @@ public LocalExecutionPlanner( SpillerFactory spillerFactory, QueryDataEncoders encoders, Optional spoolingManager, - Optional spoolingConfig, SingleStreamSpillerFactory singleStreamSpillerFactory, PartitioningSpillerFactory partitioningSpillerFactory, PagesIndex.Factory pagesIndexFactory, @@ -518,7 +515,6 @@ public LocalExecutionPlanner( this.spillerFactory = requireNonNull(spillerFactory, "spillerFactory is null"); this.encoders = requireNonNull(encoders, "encoders is null"); this.spoolingManager = requireNonNull(spoolingManager, "spoolingManager is null"); - this.spoolingConfig = requireNonNull(spoolingConfig, "spoolingConfig is null"); this.singleStreamSpillerFactory = requireNonNull(singleStreamSpillerFactory, "singleStreamSpillerFactory is null"); this.partitioningSpillerFactory = requireNonNull(partitioningSpillerFactory, "partitioningSpillerFactory is null"); this.maxPartialAggregationMemorySize = taskManagerConfig.getMaxPartialAggregationMemoryUsage(); @@ -1002,8 +998,7 @@ public PhysicalOperation visitOutput(OutputNode node, LocalExecutionPlanContext node.getId(), spooledLayout, queryDataEncoder, - spoolingManager.orElseThrow(), - spoolingConfig.orElseThrow()); + spoolingManager.orElseThrow()); return new PhysicalOperation(outputSpoolingOperatorFactory, spooledLayout, operation); } diff --git a/core/trino-main/src/main/java/io/trino/testing/PlanTester.java b/core/trino-main/src/main/java/io/trino/testing/PlanTester.java index 28a3992337d0..34b96e82d86f 100644 --- a/core/trino-main/src/main/java/io/trino/testing/PlanTester.java +++ b/core/trino-main/src/main/java/io/trino/testing/PlanTester.java @@ -756,7 +756,6 @@ private List createDrivers(Session session, @Language("SQL") String sql) new GenericSpillerFactory(unsupportedSingleStreamSpillerFactory()), new QueryDataEncoders(new SpoolingEnabledConfig(), Set.of()), Optional.empty(), - Optional.empty(), unsupportedSingleStreamSpillerFactory(), unsupportedPartitioningSpillerFactory(), new PagesIndex.TestingFactory(false), diff --git a/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java b/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java index d3568e4d5432..677510c62b51 100644 --- a/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java +++ b/core/trino-main/src/test/java/io/trino/execution/TaskTestUtils.java @@ -180,7 +180,6 @@ public static LocalExecutionPlanner createTestingPlanner() }), new QueryDataEncoders(new SpoolingEnabledConfig(), Set.of()), Optional.empty(), - Optional.empty(), (types, spillContext, memoryContext) -> { throw new UnsupportedOperationException(); },