matthewmturner commented on pull request #984: URL: https://github.com/apache/arrow-rs/pull/984#issuecomment-995911132
@shepmaster one quick question on your proposal. What would be the difference between using that approach compared to implementing the `From` trait (https://doc.rust-lang.org/std/convert/trait.From.html) for `ArrowNumericType` on each of the rust native types. I guess that would change the signatures / how we call the functions to something like the following: ``` fn eq_dict_scalar<K, T>(left: &DictionaryArray<K>, right: T) where K: ArrowNumericType, T: ArrowNumericType, { todo!() } // ---- fn usage<K>(d: &DictionaryArray<K>) where K: ArrowNumericType, { eq_dict_scalar(d, 8.into()); eq_dict_scalar(d, -64.into()); } ``` @alamb FYI -- 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]
