neilconway commented on code in PR #20352:
URL: https://github.com/apache/datafusion/pull/20352#discussion_r2844025471


##########
datafusion/functions/benches/initcap.rs:
##########
@@ -47,52 +47,124 @@ fn create_args<O: OffsetSizeTrait>(
     }
 }
 
+/// Create a Utf8 array where every value contains non-ASCII Unicode text.
+fn create_unicode_utf8_args(size: usize) -> Vec<ColumnarValue> {
+    let items: Vec<String> = (0..size)
+        .map(|_| "ñAnDÚ ÁrBOL ОлЕГ ÍslENsku".to_string())
+        .collect();
+    let array = Arc::new(StringArray::from(items)) as ArrayRef;

Review Comment:
   Sounds good, although I think `repeat_n` is a bit cleaner.



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