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


##########
arrow/src/datatypes/ffi.rs:
##########
@@ -404,4 +411,26 @@ mod tests {
         assert!(result.is_err());
         Ok(())
     }
+
+    #[test]
+    fn test_map_keys_sorted() {
+        let keys = Field::new("keys", DataType::Int32, false);
+        let values = Field::new("values", DataType::UInt32, false);
+        let entry_struct = DataType::Struct(vec![keys, values]);
+
+        // Construct a map array from the above two
+        let map_data_type =
+            DataType::Map(Box::new(Field::new("entries", entry_struct, true)), 
false);
+
+        let flags = Flags::MAP_KEYS_SORTED;
+
+        let arrow_schema = FFI_ArrowSchema::try_from(map_data_type)
+            .unwrap()
+            .with_name("map")
+            .unwrap()
+            .with_flags(flags)

Review Comment:
   `DICTIONARY_ORDERED` is also not set too. I will fix it in another PR.



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to