Skip to content

Commit

Permalink
Fix sink output schema being passed in to FileSinkExec where input …
Browse files Browse the repository at this point in the history
…schema was expected
  • Loading branch information
svranesevic committed Jun 14, 2024
1 parent cc60278 commit 65ad9b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datafusion/proto/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
.as_ref()
.ok_or_else(|| proto_error("Missing required field in protobuf"))?
.try_into()?;
let sink_schema = convert_required!(sink.sink_schema)?;
let sink_schema = input.schema();
let sort_order = sink
.sort_order
.as_ref()
Expand All @@ -1024,7 +1024,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
Ok(Arc::new(DataSinkExec::new(
input,
Arc::new(data_sink),
Arc::new(sink_schema),
sink_schema,
sort_order,
)))
}
Expand All @@ -1037,7 +1037,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
.as_ref()
.ok_or_else(|| proto_error("Missing required field in protobuf"))?
.try_into()?;
let sink_schema = convert_required!(sink.sink_schema)?;
let sink_schema = input.schema();
let sort_order = sink
.sort_order
.as_ref()
Expand All @@ -1054,7 +1054,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
Ok(Arc::new(DataSinkExec::new(
input,
Arc::new(data_sink),
Arc::new(sink_schema),
sink_schema,
sort_order,
)))
}
Expand All @@ -1067,7 +1067,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
.as_ref()
.ok_or_else(|| proto_error("Missing required field in protobuf"))?
.try_into()?;
let sink_schema = convert_required!(sink.sink_schema)?;
let sink_schema = input.schema();
let sort_order = sink
.sort_order
.as_ref()
Expand All @@ -1084,7 +1084,7 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
Ok(Arc::new(DataSinkExec::new(
input,
Arc::new(data_sink),
Arc::new(sink_schema),
sink_schema,
sort_order,
)))
}
Expand Down

0 comments on commit 65ad9b6

Please sign in to comment.