Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename hash join probe state name #14186

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ enum HashJoinProbeStep {
FastReturn,
// Spill step is used to spill the probe side data.
Spill,
// Async running will read the spilled data, then go to probe
AsyncRunning,
// Restore the spilled data, then go to probe
Restore,
}

pub struct TransformHashJoinProbe {
Expand Down Expand Up @@ -131,7 +131,7 @@ impl TransformHashJoinProbe {
Ok(())
}

fn async_run(&mut self) -> Result<Event> {
fn restore(&mut self) -> Result<Event> {
debug_assert!(self.input_port.is_finished());
if !self.input_data.is_empty() {
self.step = HashJoinProbeStep::Running;
Expand Down Expand Up @@ -313,7 +313,7 @@ impl Processor for TransformHashJoinProbe {
Ok(Event::Finished)
}
HashJoinProbeStep::Running => self.run(),
HashJoinProbeStep::AsyncRunning => self.async_run(),
HashJoinProbeStep::Restore => self.restore(),
HashJoinProbeStep::FinalScan => {
if self.output_port.is_finished() {
self.input_port.finish();
Expand Down Expand Up @@ -379,7 +379,7 @@ impl Processor for TransformHashJoinProbe {
HashJoinProbeStep::FastReturn
| HashJoinProbeStep::WaitBuild
| HashJoinProbeStep::Spill
| HashJoinProbeStep::AsyncRunning => unreachable!("{:?}", self.step),
| HashJoinProbeStep::Restore => unreachable!("{:?}", self.step),
}
}

Expand Down Expand Up @@ -443,8 +443,8 @@ impl Processor for TransformHashJoinProbe {
self.step = HashJoinProbeStep::Spill;
self.step_logs.push(HashJoinProbeStep::Spill);
} else {
self.step = HashJoinProbeStep::AsyncRunning;
self.step_logs.push(HashJoinProbeStep::AsyncRunning);
self.step = HashJoinProbeStep::Restore;
self.step_logs.push(HashJoinProbeStep::Restore);
}
} else {
self.step = HashJoinProbeStep::Running;
Expand Down Expand Up @@ -497,7 +497,7 @@ impl Processor for TransformHashJoinProbe {
}
}
}
HashJoinProbeStep::AsyncRunning => {
HashJoinProbeStep::Restore => {
let spill_state = self.spill_state.as_ref().unwrap();
let p_id = self
.join_probe_state
Expand Down
Loading