This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 156858db6 Derive RunArray Clone (#3932)
156858db6 is described below
commit 156858db6f857336863179a8a6805526e0392af8
Author: Raphael Taylor-Davies <[email protected]>
AuthorDate: Fri Mar 24 12:38:46 2023 +0000
Derive RunArray Clone (#3932)
---
arrow-array/src/array/run_array.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arrow-array/src/array/run_array.rs
b/arrow-array/src/array/run_array.rs
index 3aefb53b8..652ec0be6 100644
--- a/arrow-array/src/array/run_array.rs
+++ b/arrow-array/src/array/run_array.rs
@@ -67,6 +67,16 @@ pub struct RunArray<R: RunEndIndexType> {
values: ArrayRef,
}
+impl<R: RunEndIndexType> Clone for RunArray<R> {
+ fn clone(&self) -> Self {
+ Self {
+ data: self.data.clone(),
+ run_ends: self.run_ends.clone(),
+ values: self.values.clone(),
+ }
+ }
+}
+
impl<R: RunEndIndexType> RunArray<R> {
/// Calculates the logical length of the array encoded
/// by the given run_ends array.