chaokunyang commented on code in PR #3087:
URL: https://github.com/apache/fory/pull/3087#discussion_r2646603200


##########
rust/fory-derive/src/util.rs:
##########
@@ -23,13 +23,25 @@ pub fn sorted_fields(fields: &Fields) -> Vec<&Field> {
 }
 
 pub fn get_sorted_fields<'a>(fields: &[&'a Field]) -> Vec<&'a Field> {
-    use crate::object::util::get_sorted_field_names;
+    use crate::object::util::{get_sorted_field_names, is_tuple_struct};
 
+    // For tuple structs, we must preserve the original field order

Review Comment:
   @ariesdevil If we take tuple struct as named struct with name as 
`0/1/2/3/...`, the `get_sorted_field_names` should work too?
   
   I'm think whether we could use same protocol as named struct. In this way, 
the compatible mode will work with minimal changes



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to