yahoNanJing commented on code in PR #153:
URL: https://github.com/apache/arrow-ballista/pull/153#discussion_r954428519
##########
ballista/rust/scheduler/src/state/execution_graph.rs:
##########
@@ -410,87 +594,33 @@ impl ExecutionGraph {
session_ctx: &SessionContext,
) -> Result<ExecutionGraph> {
let mut stages: HashMap<usize, ExecutionStage> = HashMap::new();
- for stage in proto.stages {
- let plan_proto = U::try_decode(stage.plan.as_slice())?;
- let plan = plan_proto.try_into_physical_plan(
- session_ctx,
- session_ctx.runtime_env().as_ref(),
- codec.physical_extension_codec(),
- )?;
-
- let stage_id = stage.stage_id as usize;
- let partitions: usize = stage.partitions as usize;
-
- let mut task_statuses: Vec<Option<task_status::Status>> =
- vec![None; partitions];
-
- for status in stage.task_statuses {
- if let Some(task_id) = status.task_id.as_ref() {
- task_statuses[task_id.partition_id as usize] =
status.status
+ for graph_stage in proto.stages {
+ let stage_type = graph_stage.stage_type.expect("Unexpected empty
stage");
Review Comment:
The `stage_type` is an option. Can we apply `?` to an option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]