alamb commented on code in PR #13758:
URL: https://github.com/apache/datafusion/pull/13758#discussion_r1884310286
##########
datafusion/functions/src/strings.rs:
##########
@@ -185,9 +185,24 @@ impl StringArrayBuilder {
unsafe { self.offsets_buffer.push_unchecked(next_offset) };
}
+ /// Finalise the builder into a concrete [`StringArray`].
+ ///
+ /// # Panics
+ ///
+ /// This method can panic when:
+ ///
+ /// - the provided `null_buffer` is not the same length as the
`offsets_buffer`.
pub fn finish(self, null_buffer: Option<NullBuffer>) -> StringArray {
+ let row_count = self.offsets_buffer.len() / size_of::<i32>() - 1;
Review Comment:
👨🍳 👌
--
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]