Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused argument #24766

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -73,18 +72,16 @@ public class OutputSpoolingOperatorFactory
private final Map<Symbol, Integer> operatorLayout;
private final SpoolingManager spoolingManager;
private final QueryDataEncoder queryDataEncoder;
private final SpoolingConfig spoolingConfig;

private boolean closed;

public OutputSpoolingOperatorFactory(int operatorId, PlanNodeId planNodeId, Map<Symbol, Integer> operatorLayout, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, SpoolingConfig spoolingConfig)
public OutputSpoolingOperatorFactory(int operatorId, PlanNodeId planNodeId, Map<Symbol, Integer> 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<OutputColumn> spooledOutputLayout(OutputNode outputNode, Map<Symbol, Integer> layout)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -161,7 +158,7 @@ enum State

private Page outputPage;

public OutputSpoolingOperator(OperatorContext operatorContext, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, SpoolingConfig spoolingConfig, Map<Symbol, Integer> layout)
public OutputSpoolingOperator(OperatorContext operatorContext, QueryDataEncoder queryDataEncoder, SpoolingManager spoolingManager, Map<Symbol, Integer> layout)
{
this.operatorContext = requireNonNull(operatorContext, "operatorContext is null");
this.controller = new OutputSpoolingController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -432,7 +431,6 @@ public class LocalExecutionPlanner
private final SpillerFactory spillerFactory;
private final QueryDataEncoders encoders;
private final Optional<SpoolingManager> spoolingManager;
private final Optional<SpoolingConfig> spoolingConfig;
private final SingleStreamSpillerFactory singleStreamSpillerFactory;
private final PartitioningSpillerFactory partitioningSpillerFactory;
private final PagesIndex.Factory pagesIndexFactory;
Expand Down Expand Up @@ -487,7 +485,6 @@ public LocalExecutionPlanner(
SpillerFactory spillerFactory,
QueryDataEncoders encoders,
Optional<SpoolingManager> spoolingManager,
Optional<SpoolingConfig> spoolingConfig,
SingleStreamSpillerFactory singleStreamSpillerFactory,
PartitioningSpillerFactory partitioningSpillerFactory,
PagesIndex.Factory pagesIndexFactory,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ private List<Driver> 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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ public static LocalExecutionPlanner createTestingPlanner()
}),
new QueryDataEncoders(new SpoolingEnabledConfig(), Set.of()),
Optional.empty(),
Optional.empty(),
(types, spillContext, memoryContext) -> {
throw new UnsupportedOperationException();
},
Expand Down
Loading