andygrove commented on code in PR #19570:
URL: https://github.com/apache/datafusion/pull/19570#discussion_r2653970542


##########
datafusion/functions/src/string/split_part.rs:
##########
@@ -219,22 +219,22 @@ where
         .try_for_each(|((string, delimiter), n)| -> Result<(), 
DataFusionError> {
             match (string, delimiter, n) {
                 (Some(string), Some(delimiter), Some(n)) => {
-                    let split_string: Vec<&str> = 
string.split(delimiter).collect();

Review Comment:
   This was allocating strings for all parts even if only some parts were needed



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