alamb commented on code in PR #4485:
URL: https://github.com/apache/arrow-datafusion/pull/4485#discussion_r1038559938


##########
datafusion/proto/src/from_proto.rs:
##########
@@ -806,11 +806,20 @@ pub fn parse_expr(
                         .ok_or_else(|| Error::unknown("BuiltInWindowFunction", 
*i))?
                         .into();
 
+                    let args = match parse_optional_expr(&expr.expr, 
registry)? {
+                        None => {
+                            vec![]
+                        }
+                        Some(x) => {

Review Comment:
   How about something like (untested):
   
   ```rust
   let args = parse_optional_expr(&expr.expr, registry)?
     .map(Vec::new)
     .unwrap_or_else(|| vec![]);
   ```
   
   Not sure if that is better but it is more functional



-- 
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]

Reply via email to