Jefffrey commented on code in PR #11630:
URL: https://github.com/apache/arrow-rs/pull/11630#discussion_r4301826890
##########
arrow-schema/src/ffi.rs:
##########
@@ -889,9 +889,10 @@ impl TryFrom<&Field> for FFI_ArrowSchema {
flags |= Flags::DICTIONARY_ORDERED;
}
- let schema = FFI_ArrowSchema::try_from(field.data_type())?
- .with_name(field.name())?
- .with_flags(flags)?;
+ let schema =
FFI_ArrowSchema::try_from(field.data_type())?.with_name(field.name())?;
+ // Keep the flags set for the data type, such as `MAP_KEYS_SORTED`.
+ let flags = flags | Flags::from_bits_truncate(schema.flags);
Review Comment:
is there a reason we dont just directly check against map type here, and
rely instead on `FFI_ArrowSchema::try_from` to do it for us and retrieve it
from the flags?
--
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]