ongchi commented on code in PR #7921:
URL: https://github.com/apache/arrow-datafusion/pull/7921#discussion_r1370277877
##########
datafusion/proto/src/physical_plan/mod.rs:
##########
@@ -394,17 +394,12 @@ impl AsExecutionPlan for PhysicalPlanNode {
vec![]
};
- let input_schema = hash_agg
- .input_schema
- .as_ref()
- .ok_or_else(|| {
- DataFusionError::Internal(
- "input_schema in AggregateNode is
missing.".to_owned(),
- )
- })?
- .clone();
- let physical_schema: SchemaRef =
- SchemaRef::new((&input_schema).try_into()?);
+ let input_schema =
hash_agg.input_schema.as_ref().ok_or_else(|| {
+ DataFusionError::Internal(
+ "input_schema in AggregateNode is missing.".to_owned(),
+ )
+ })?;
+ let physical_schema: SchemaRef =
SchemaRef::new(input_schema.try_into()?);
Review Comment:
The SchemaRef seems able create from ref of input_schema.
--
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]