You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/17 01:15:04 UTC

[GitHub] [arrow-rs] HaoYang670 commented on a diff in pull request #1853: Clean up the test code of `substring` kernel.

HaoYang670 commented on code in PR #1853:
URL: https://github.com/apache/arrow-rs/pull/1853#discussion_r899675949


##########
arrow/src/compute/kernels/substring.rs:
##########
@@ -445,64 +445,61 @@ mod tests {
     use super::*;
     use crate::datatypes::*;
 
-    #[allow(clippy::type_complexity)]
+    macro_rules! gen_test_cases {
+        ($input:expr, $(($start:expr, $len:expr, $result:expr)), *) => {
+            [
+                $(
+                    ($input.clone(), $start, $len, $result),
+                )*
+            ]
+        };
+    }
+
+    macro_rules! do_test {
+        ($cases:expr, $array_ty:ty, $substring_fn:ident) => {
+            $cases.into_iter().try_for_each::<_, Result<()>>(

Review Comment:
   Great catch! Updated.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org