ongchi commented on code in PR #7921:
URL: https://github.com/apache/arrow-datafusion/pull/7921#discussion_r1370262454
##########
datafusion/proto/src/logical_plan/mod.rs:
##########
@@ -458,7 +458,7 @@ impl AsLogicalPlan for LogicalPlanNode {
let input: LogicalPlan =
into_logical_plan!(repartition.input, ctx,
extension_codec)?;
use protobuf::repartition_node::PartitionMethod;
- let pb_partition_method =
repartition.partition_method.clone().ok_or_else(|| {
+ let pb_partition_method =
repartition.partition_method.as_ref().ok_or_else(|| {
DataFusionError::Internal(String::from(
"Protobuf deserialization error, RepartitionNode was
missing required field 'partition_method'",
))
Review Comment:
May be returned early and the clone could be avoided.
--
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]