comphead commented on code in PR #21963:
URL: https://github.com/apache/datafusion/pull/21963#discussion_r3169845982


##########
datafusion/spark/src/function/string/substring.rs:
##########
@@ -166,8 +166,7 @@ fn spark_start_to_datafusion_start(start: i64, len: usize) 
-> i64 {
         start.max(1)
     } else {
         let len_i64 = i64::try_from(len).unwrap_or(i64::MAX);
-        let start = start.saturating_add(len_i64).saturating_add(1);
-        start.max(1)
+        start + len_i64 + 1

Review Comment:
   m, it would be good to update it, yes



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

Reply via email to