Skip to content

Commit

Permalink
Add nonnull check for directExchangeClientSupplier
Browse files Browse the repository at this point in the history
Refactor the PlanTester to pass the nonnull `directExchangeClientSupplier`.
Also add nonnull check for the `sourceId`, `serdeFactory` in `ExchangeOperator`
  • Loading branch information
chenjian2664 authored and ebyhr committed Dec 20, 2024
1 parent bb9d648 commit 92c1fdd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public ExchangeOperatorFactory(
ExchangeManagerRegistry exchangeManagerRegistry)
{
this.operatorId = operatorId;
this.sourceId = sourceId;
this.directExchangeClientSupplier = directExchangeClientSupplier;
this.serdeFactory = serdeFactory;
this.sourceId = requireNonNull(sourceId, "sourceId is null");
this.directExchangeClientSupplier = requireNonNull(directExchangeClientSupplier, "directExchangeClientSupplier is null");
this.serdeFactory = requireNonNull(serdeFactory, "serdeFactory is null");
this.retryPolicy = requireNonNull(retryPolicy, "retryPolicy is null");
this.exchangeManagerRegistry = requireNonNull(exchangeManagerRegistry, "exchangeManagerRegistry is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public LocalExecutionPlanner(
this.pageSourceManager = requireNonNull(pageSourceManager, "pageSourceManager is null");
this.indexManager = requireNonNull(indexManager, "indexManager is null");
this.nodePartitioningManager = requireNonNull(nodePartitioningManager, "nodePartitioningManager is null");
this.directExchangeClientSupplier = directExchangeClientSupplier;
this.directExchangeClientSupplier = requireNonNull(directExchangeClientSupplier, "directExchangeClientSupplier is null");
this.pageSinkManager = requireNonNull(pageSinkManager, "pageSinkManager is null");
this.expressionCompiler = requireNonNull(expressionCompiler, "expressionCompiler is null");
this.pageFunctionCompiler = requireNonNull(pageFunctionCompiler, "pageFunctionCompiler is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,9 @@ private List<Driver> createDrivers(Session session, @Language("SQL") String sql)
indexManager,
nodePartitioningManager,
pageSinkManager,
null,
(_, _, _, _, _, _) -> {
throw new UnsupportedOperationException();
},
expressionCompiler,
pageFunctionCompiler,
joinFilterFunctionCompiler,
Expand Down

0 comments on commit 92c1fdd

Please sign in to comment.