Skip to content

Commit

Permalink
Remove redundant not null check in HttpRemoteTask
Browse files Browse the repository at this point in the history
Condition `tableScanSplits != null` is always true, because `Multimap.get` returns an empty collection, not null.
  • Loading branch information
polaris6 authored and ebyhr committed Jun 16, 2022
1 parent 8935a09 commit 983488e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public HttpRemoteTask(
long pendingSourceSplitsWeight = 0;
for (PlanNodeId planNodeId : planFragment.getPartitionedSources()) {
Collection<Split> tableScanSplits = initialSplits.get(planNodeId);
if (tableScanSplits != null && !tableScanSplits.isEmpty()) {
if (!tableScanSplits.isEmpty()) {
pendingSourceSplitCount += tableScanSplits.size();
pendingSourceSplitsWeight = addExact(pendingSourceSplitsWeight, SplitWeight.rawValueSum(tableScanSplits, Split::getSplitWeight));
}
Expand Down

0 comments on commit 983488e

Please sign in to comment.