findepi commented on code in PR #12178:
URL: https://github.com/apache/datafusion/pull/12178#discussion_r1731486232
##########
datafusion/proto/src/logical_plan/from_proto.rs:
##########
@@ -586,7 +586,10 @@ pub fn parse_expr(
parse_exprs(&pb.args, registry, codec)?,
pb.distinct,
parse_optional_expr(pb.filter.as_deref(), registry,
codec)?.map(Box::new),
- parse_vec_expr(&pb.order_by, registry, codec)?,
+ match pb.order_by.len() {
+ 0 => None,
+ _ => Some(parse_exprs(&pb.order_by, registry, codec)?),
+ },
Review Comment:
this pattern is already used here
https://github.com/apache/datafusion/blob/117ab1b8c861f431b2d04443e2028ca16fafc57c/datafusion/proto/src/logical_plan/mod.rs#L817-L819
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]