tustvold commented on code in PR #2872:
URL: https://github.com/apache/arrow-rs/pull/2872#discussion_r997646085
##########
arrow-array/src/cast.rs:
##########
@@ -24,221 +24,221 @@ use crate::types::*;
#[doc(hidden)]
#[macro_export]
macro_rules! repeat_pat {
- ($e:pat, $v_:ident) => {
+ ($e:pat, $v_:expr) => {
$e
};
- ($e:pat, $v_:ident $(, $tail:ident)+) => {
+ ($e:pat, $v_:expr $(, $tail:expr)+) => {
($e, $crate::repeat_pat!($e $(, $tail)+))
}
}
-/// Downcast an [`Array`] to a [`PrimitiveArray`] based on its [`DataType`]
-/// accepts a number of subsequent patterns to match the data type
+/// Given one or more expressions evaluating to integer [`DataType`] invokes
the provided macro
+/// `m` with the corresponding [`ArrowPrimitiveType`], followed by any
additional arguments
Review Comment:
This also downcasts floats and decimals?
--
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]