Skip to content

Commit

Permalink
remove double check
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiakiNishimura committed Feb 13, 2025
1 parent 0a2870b commit 016d55a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/jogasaki/plan/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1214,17 +1214,12 @@ size_t intermediate_calculate_partition(takatori::plan::step const& s) noexcept
return sum;
}
size_t calculate_partition(takatori::plan::step const& s) noexcept {
if (s.kind() != takatori::plan::step_kind::process) {
VLOG_LP(log_error) << "The bottom of graph_type kind is process";
return global::config_pool()->default_partitions();
}
auto& process = unsafe_downcast<takatori::plan::process>(s);
if (!process.downstreams().empty()) {
VLOG_LP(log_error) << "The bottom of graph_type must not have downstreams";
return global::config_pool()->default_partitions();
}
if (process.upstreams().empty()) { return terminal_calculate_partition(s); }
if (!has_emit_operator(s)) { return global::config_pool()->default_partitions(); }
return intermediate_calculate_partition(s);
}

Expand Down

0 comments on commit 016d55a

Please sign in to comment.