Skip to content

Commit 518b244

Browse files
chenjian2664ebyhr
authored andcommitted
Convert field to local variable in PlanTester constructor
1 parent 8dc8ffb commit 518b244

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

core/trino-main/src/main/java/io/trino/testing/PlanTester.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ public class PlanTester
283283

284284
private final SqlParser sqlParser;
285285
private final PlanFragmenter planFragmenter;
286-
private final InternalNodeManager nodeManager;
287286
private final TypeOperators typeOperators;
288287
private final BlockTypeOperators blockTypeOperators;
289288
private final PlannerContext plannerContext;
@@ -310,7 +309,6 @@ public class PlanTester
310309
private final AnalyzePropertyManager analyzePropertyManager;
311310

312311
private final PageFunctionCompiler pageFunctionCompiler;
313-
private final ColumnarFilterCompiler filterCompiler;
314312
private final ExpressionCompiler expressionCompiler;
315313
private final JoinFilterFunctionCompiler joinFilterFunctionCompiler;
316314
private final JoinCompiler joinCompiler;
@@ -319,7 +317,6 @@ public class PlanTester
319317
private final CoordinatorDynamicCatalogManager catalogManager;
320318
private final PluginManager pluginManager;
321319
private final ExchangeManagerRegistry exchangeManagerRegistry;
322-
private final SpoolingManagerRegistry spoolingManagerRegistry;
323320
private final TaskManagerConfig taskManagerConfig;
324321
private final OptimizerConfig optimizerConfig;
325322
private final StatementAnalyzerFactory statementAnalyzerFactory;
@@ -349,7 +346,7 @@ private PlanTester(Session defaultSession, int nodeCountForStats)
349346
this.typeOperators = new TypeOperators();
350347
this.blockTypeOperators = new BlockTypeOperators(typeOperators);
351348
this.sqlParser = new SqlParser();
352-
this.nodeManager = TestingInternalNodeManager.createDefault();
349+
InternalNodeManager nodeManager = TestingInternalNodeManager.createDefault();
353350
PageSorter pageSorter = new PagesIndexPageSorter(new PagesIndex.TestingFactory(false));
354351
NodeSchedulerConfig nodeSchedulerConfig = new NodeSchedulerConfig().setIncludeCoordinator(true);
355352
this.optimizerConfig = new OptimizerConfig();
@@ -439,7 +436,7 @@ private PlanTester(Session defaultSession, int nodeCountForStats)
439436

440437
this.plannerContext = new PlannerContext(metadata, typeOperators, blockEncodingSerde, typeManager, functionManager, languageFunctionManager, tracer);
441438
this.pageFunctionCompiler = new PageFunctionCompiler(functionManager, 0);
442-
this.filterCompiler = new ColumnarFilterCompiler(functionManager, 0);
439+
ColumnarFilterCompiler filterCompiler = new ColumnarFilterCompiler(functionManager, 0);
443440
this.expressionCompiler = new ExpressionCompiler(pageFunctionCompiler, filterCompiler);
444441
this.joinFilterFunctionCompiler = new JoinFilterFunctionCompiler(functionManager);
445442

@@ -478,7 +475,7 @@ private PlanTester(Session defaultSession, int nodeCountForStats)
478475
ImmutableSet.of(new ExcludeColumnsFunction()));
479476

480477
exchangeManagerRegistry = new ExchangeManagerRegistry(noop(), noopTracer(), secretsResolver, new ExchangeManagerConfig());
481-
spoolingManagerRegistry = new SpoolingManagerRegistry(
478+
SpoolingManagerRegistry spoolingManagerRegistry = new SpoolingManagerRegistry(
482479
new InternalNode("nodeId", URI.create("http://localhost:8080"), NodeVersion.UNKNOWN, false),
483480
new ServerConfig(),
484481
new SpoolingEnabledConfig(),

0 commit comments

Comments
 (0)