tustvold commented on code in PR #3798: URL: https://github.com/apache/arrow-rs/pull/3798#discussion_r1124918954
########## arrow-string/src/concat_elements.rs: ########## @@ -18,29 +18,18 @@ use std::sync::Arc; use arrow_array::builder::BufferBuilder; +use arrow_array::types::ByteArrayType; use arrow_array::*; +use arrow_buffer::ArrowNativeType; use arrow_data::bit_mask::combine_option_bitmap; use arrow_data::ArrayDataBuilder; use arrow_schema::{ArrowError, DataType}; -/// Returns the elementwise concatenation of a [`StringArray`]. -/// -/// An index of the resulting [`StringArray`] is null if any of -/// `StringArray` are null at that location. -/// -/// ```text -/// e.g: -/// -/// ["Hello"] + ["World"] = ["HelloWorld"] -/// -/// ["a", "b"] + [None, "c"] = [None, "bc"] -/// ``` -/// -/// An error will be returned if `left` and `right` have different lengths -pub fn concat_elements_utf8<Offset: OffsetSizeTrait>( - left: &GenericStringArray<Offset>, - right: &GenericStringArray<Offset>, -) -> Result<GenericStringArray<Offset>, ArrowError> { +/// Returns the elementwise concatenation of a [`GenericByteArray`]. +pub fn concat_elements_bytes<T: ByteArrayType>( Review Comment: Doesn't need to be, but might allow generic code to use it, without needing special cases perhaps?? -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org