alamb commented on code in PR #2322:
URL: https://github.com/apache/arrow-rs/pull/2322#discussion_r938740733
##########
arrow/src/array/array_dictionary.rs:
##########
@@ -421,14 +421,25 @@ impl<T: ArrowPrimitiveType> fmt::Debug for
DictionaryArray<T> {
/// assert_eq!(maybe_val.unwrap(), orig)
/// }
/// ```
-#[derive(Copy, Clone)]
pub struct TypedDictionaryArray<'a, K: ArrowPrimitiveType, V> {
/// The dictionary array
dictionary: &'a DictionaryArray<K>,
/// The values of the dictionary
values: &'a V,
}
+// Manually implement `Clone` to avoid `V: Clone` type constraint
Review Comment:
That rfc doesn't sound quite right (or at least it is a overkill -- like a 🔨
for swatting a 🪰 ). All that is needed in this case is to recognize that the
struct only uses `&V` rather than `V` rather than a way to provide generic
arguments to macros 😱
Also, I am firmly of the belief that adding more generics is not the answer
to most of life's problems 🤣 Maybe because my feeble mind can't handle the
extra level of indirection
--
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]