alamb commented on code in PR #3902:
URL: https://github.com/apache/arrow-datafusion/pull/3902#discussion_r1000921939
##########
datafusion/proto/src/from_proto.rs:
##########
@@ -1137,10 +1138,20 @@ pub fn parse_expr(
parse_expr(&args[0], registry)?,
parse_expr(&args[1], registry)?,
)),
- ScalarFunction::Substr => Ok(substr(
- parse_expr(&args[0], registry)?,
- parse_expr(&args[1], registry)?,
- )),
+ ScalarFunction::Substr => {
+ if args.len() > 2 {
Review Comment:
I recommend adding an assert `assert_eq!(args.len(), 3)` in this case so
that we don't get another silent failure if we add additional argument support
to substr
--
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]