Skip to content

Commit

Permalink
modify create_task_context function
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiakiNishimura committed Nov 22, 2024
1 parent 5e9d659 commit 1eb557d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/jogasaki/executor/process/flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sequence_view<std::shared_ptr<model::task>> flow::create_tasks() {

contexts.reserve(partitions);
for (std::size_t i=0; i < partitions; ++i) {
contexts.emplace_back(create_task_context(i, operators, sink_idx_base + i));
contexts.emplace_back(create_task_context(i, operators, sink_idx_base + i, operators.range()));
}

bool is_rtx = context_->transaction()->option()->type()
Expand Down Expand Up @@ -163,14 +163,15 @@ model::step_kind flow::kind() const noexcept {
std::shared_ptr<impl::task_context> flow::create_task_context(
std::size_t partition,
impl::ops::operator_container const& operators,
std::size_t sink_index
std::size_t sink_index,
std::shared_ptr<impl::scan_range> const& range
) {
auto external_output = operators.io_exchange_map().external_output();
auto ctx = std::make_shared<impl::task_context>(
*context_,
partition,
operators.io_exchange_map(),
operators.range(),
range,
(context_->record_channel() && external_output != nullptr) ? context_->record_channel().get() : nullptr,
sink_index
);
Expand Down
7 changes: 3 additions & 4 deletions src/jogasaki/executor/process/flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ class cache_align flow : public model::flow {
[[nodiscard]] std::shared_ptr<impl::task_context> create_task_context(
std::size_t partition,
impl::ops::operator_container const& operators,
std::size_t sink_index
std::size_t sink_index,
std::shared_ptr<impl::scan_range> const& range
);
std::size_t check_empty_input_and_calculate_partitions();
};

}


} // namespace jogasaki::executor::process

0 comments on commit 1eb557d

Please sign in to comment.