Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Added MutableUtf8ValuesArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Sep 29, 2022
1 parent 828d976 commit ae06ac8
Show file tree
Hide file tree
Showing 3 changed files with 472 additions and 139 deletions.
11 changes: 11 additions & 0 deletions src/array/utf8/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,19 @@ pub(super) mod fmt;
mod from;
mod iterator;
mod mutable;
mod mutable_values;
pub use iterator::*;
pub use mutable::*;
pub use mutable_values::MutableUtf8ValuesArray;

// Auxiliary struct to allow presenting &str as [u8] to a generic function
pub(super) struct StrAsBytes<P>(P);
impl<T: AsRef<str>> AsRef<[u8]> for StrAsBytes<T> {
#[inline(always)]
fn as_ref(&self) -> &[u8] {
self.0.as_ref().as_bytes()
}
}

/// A [`Utf8Array`] is arrow's semantic equivalent of an immutable `Vec<Option<String>>`.
/// Cloning and slicing this struct is `O(1)`.
Expand Down
Loading

0 comments on commit ae06ac8

Please sign in to comment.