You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/31 09:37:16 UTC

[GitHub] [arrow-datafusion] Dandandan commented on pull request #2128: MINOR: fix concat_ws corner bug

Dandandan commented on pull request #2128:
URL: https://github.com/apache/arrow-datafusion/pull/2128#issuecomment-1084330984


   > How about
   > ```rust
   >   let mut owned_string = Vec::with_capacity(args.len()-1);
   >   for arg_index in 1..args.len() {
   >       let arg = &args[arg_index];
   >       if !arg.is_null(index) {
   >           owned_string.push(arg.value(index));
   >       }
   >   }
   >   owned_string.join(sep)
   > ```
   
   Could also use an iterator + `flat_map` + `collect` (into `Vec<String>`) for a rusty version.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org