jhorstmann commented on a change in pull request #1048:
URL: https://github.com/apache/arrow-rs/pull/1048#discussion_r772704703
##########
File path: arrow/src/array/ord.rs
##########
@@ -303,6 +362,23 @@ pub mod tests {
Ok(())
}
+ #[test]
+ fn test_dict_keys() -> Result<()> {
+ let data = vec!["a", "b", "c", "a", "a", "c", "c"];
+ let array = data.into_iter().collect::<DictionaryArray<Int16Type>>();
Review comment:
For this specific input the dictionary would be sorted because the keys
are handed out in the order of the values in the input. So "a" would be key 0,
"b" => 1 and "c" => 2. Agree that this is misleading, even more so in the test
for the sort kernel where the input values are not already in alphabetical
order. I'll try to make that clearer.
--
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]