geoffreyclaude commented on code in PR #11771:
URL: https://github.com/apache/arrow-rs/pull/11771#discussion_r4563694936


##########
arrow-row/src/lib.rs:
##########
@@ -730,20 +759,13 @@ impl Codec {
                 Ok(Self::Struct(converter, owned))
             }
             DataType::Union(fields, _mode) => {
-                // similar to dictionaries and lists, we set descending to 
false and negate nulls_first
-                // since the encoded contents will be inverted if descending 
is set
-                let options = SortOptions {
-                    descending: false,
-                    nulls_first: sort_field.options.nulls_first != 
sort_field.options.descending,
-                };
-
                 let mut converters = Vec::with_capacity(fields.len());
                 let mut type_ids = Vec::with_capacity(fields.len());
                 let mut null_rows = Vec::with_capacity(fields.len());
 
                 for (type_id, field) in fields.iter() {
                     let sort_field =

Review Comment:
   Added the note explaining why child converters need the Union’s full 
`SortOptions`: only the type-ID byte is inverted separately by the Union 
encoder.



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