Use dummy spiller when creating testing LocalExecutionPlanner
A true spiller should be closed properly, so don't use one.
@@ -16,7 +16,6 @@ package com.facebook.presto.execution;
import com.facebook.presto.OutputBuffers;
import com.facebook.presto.ScheduledSplit;
import com.facebook.presto.TaskSource;
-import com.facebook.presto.block.BlockEncodingManager;
import com.facebook.presto.connector.ConnectorId;
import com.facebook.presto.cost.CoefficientBasedCostCalculator;
import com.facebook.presto.execution.TestSqlTaskManager.MockExchangeClientSupplier;
@@ -35,12 +34,9 @@ import com.facebook.presto.spi.block.TestingBlockEncodingSerde;
import com.facebook.presto.spi.connector.ConnectorTransactionHandle;
import com.facebook.presto.spi.predicate.TupleDomain;
import com.facebook.presto.spi.type.TestingTypeManager;
-import com.facebook.presto.spiller.FileSingleStreamSpillerFactory;
import com.facebook.presto.spiller.GenericSpillerFactory;
-import com.facebook.presto.spiller.SpillerStats;
import com.facebook.presto.split.PageSinkManager;
import com.facebook.presto.split.PageSourceManager;
-import com.facebook.presto.sql.analyzer.FeaturesConfig;
import com.facebook.presto.sql.gen.ExpressionCompiler;
import com.facebook.presto.sql.gen.JoinCompiler;
import com.facebook.presto.sql.gen.JoinFilterFunctionCompiler;
@@ -139,7 +135,9 @@ public final class TaskTestUtils
new IndexJoinLookupStats(),
new CompilerConfig(),
new TaskManagerConfig(),
- new GenericSpillerFactory(new FileSingleStreamSpillerFactory(new BlockEncodingManager(metadata.getTypeManager()), new SpillerStats(), new FeaturesConfig())),
+ new GenericSpillerFactory((types, spillContext, memoryContext) -> {
+ throw new UnsupportedOperationException();
+ }),
new TestingBlockEncodingSerde(new TestingTypeManager()),
new PagesIndex.TestingFactory(),
new JoinCompiler(),
