Omega359 commented on code in PR #20659:
URL: https://github.com/apache/datafusion/pull/20659#discussion_r2920357471
##########
datafusion/functions/src/unicode/common.rs:
##########
@@ -181,3 +183,65 @@ fn general_left_right_view<F: LeftRightSlicer>(
)?;
Ok(Arc::new(result) as ArrayRef)
}
+
+/// A uniform write interface over `GenericStringBuilder` and
`StringViewBuilder`.
+pub(crate) trait StringArrayWriter {
+ fn write_str(&mut self, s: &str) -> Result<()>;
+ fn write_char(&mut self, c: char) -> Result<()>;
+ fn finalize(&mut self);
Review Comment:
This function name might be confusing as it's pretty close to `finish`. I
don't have any suggestions as to a replacement though.
Documentation would be helpful here.
Also, I wonder if it would be possible for this trait to extend
StringLikeArrayBuilder?
--
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]