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/08/20 19:15:21 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #2539: Compare dictionary array and primitive array in lt_dyn, lt_eq_dyn, gt_dyn, gt_eq_dyn kernels

viirya commented on code in PR #2539:
URL: https://github.com/apache/arrow-rs/pull/2539#discussion_r950730946


##########
arrow/src/compute/kernels/comparison.rs:
##########
@@ -5180,4 +5220,62 @@ mod tests {
             BooleanArray::from(vec![Some(false), None, Some(false)])
         );
     }
+
+    #[test]
+    fn test_lt_dyn_lt_eq_dyn_gt_dyn_gt_eq_dyn_dictionary_i8_i8_array() {
+        let values = Int8Array::from_iter_values([10_i8, 11, 12, 13, 14, 15, 16, 17]);
+        let keys = Int8Array::from_iter_values([2_i8, 3, 4]);
+
+        let dict_array = DictionaryArray::try_new(&keys, &values).unwrap();

Review Comment:
   [12, 13, 14]



##########
arrow/src/compute/kernels/comparison.rs:
##########
@@ -5180,4 +5220,62 @@ mod tests {
             BooleanArray::from(vec![Some(false), None, Some(false)])
         );
     }
+
+    #[test]
+    fn test_lt_dyn_lt_eq_dyn_gt_dyn_gt_eq_dyn_dictionary_i8_i8_array() {
+        let values = Int8Array::from_iter_values([10_i8, 11, 12, 13, 14, 15, 16, 17]);
+        let keys = Int8Array::from_iter_values([2_i8, 3, 4]);
+
+        let dict_array = DictionaryArray::try_new(&keys, &values).unwrap();
+
+        let array = Int8Array::from_iter([Some(12_i8), None, Some(11)]);

Review Comment:
   [12, null, 11]



-- 
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