tustvold commented on code in PR #4605:
URL: https://github.com/apache/arrow-rs/pull/4605#discussion_r1279509074


##########
arrow-ord/src/sort.rs:
##########
@@ -563,28 +550,23 @@ fn sorted_rank(sorted_value_indices: &UInt32Array) -> 
Vec<u32> {
     out
 }
 
-/// Sort dictionary encoded primitive values
-fn sort_primitive_dictionary<K, F>(
-    values: &DictionaryArray<K>,
-    value_indices_map: &[u32],
+/// Sort dictionary given the sorted rank of each key
+fn sort_dictionary<K: ArrowDictionaryKeyType>(
+    dict: &DictionaryArray<K>,
+    rank: &[u32],
     value_indices: Vec<u32>,
     null_indices: Vec<u32>,
     options: SortOptions,
     limit: Option<usize>,
-    cmp: F,

Review Comment:
   This argument was always just passed PartialOrd::cmp and so there was no 
reason to special-case it



##########
arrow-ord/src/sort.rs:
##########
@@ -563,28 +550,23 @@ fn sorted_rank(sorted_value_indices: &UInt32Array) -> 
Vec<u32> {
     out
 }
 
-/// Sort dictionary encoded primitive values
-fn sort_primitive_dictionary<K, F>(
-    values: &DictionaryArray<K>,
-    value_indices_map: &[u32],
+/// Sort dictionary given the sorted rank of each key
+fn sort_dictionary<K: ArrowDictionaryKeyType>(
+    dict: &DictionaryArray<K>,
+    rank: &[u32],
     value_indices: Vec<u32>,
     null_indices: Vec<u32>,
     options: SortOptions,
     limit: Option<usize>,
-    cmp: F,

Review Comment:
   This argument was always just passed PartialOrd::cmp and so there was no 
reason to make it generic



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

Reply via email to