urlyy commented on issue #3049:
URL: https://github.com/apache/fory/issues/3049#issuecomment-3657042970
I've identified a small, reproducible example that helps localize the
problem. We will handle this as soon as possible.
```rust
#[test]
fn test_field_info(){
// my_vec: Vec<Wrapper<Another>>
let field = FieldInfo {
field_id: 0,
field_name: "my_vec".to_string(),
field_type: FieldType {
// Vec
type_id: 21,
nullable: true,
generics: vec![
FieldType {
// Wrapper(struct)
type_id: 787,
nullable: true,
generics: vec![
FieldType {
// Another(struct)
type_id: 528,
nullable: true,
generics: vec![],
}
],
}
],
},
};
let bytes = field.to_bytes().unwrap();
let new_field = FieldInfo::from_bytes(&mut
Reader::new(bytes.as_slice())).unwrap();
// an unexpected result, but equal to actual result
let field_info_without_another = FieldInfo {
// here changes too!!!!
field_id: -1,
field_name: "my_vec".to_string(),
field_type: FieldType {
// Vec
type_id: 21,
nullable: true,
generics: vec![
FieldType {
// Wrapper(struct)
type_id: 787,
nullable: true,
generics: vec![
// FieldType {
// // Another(struct)
// type_id: 528,
// nullable: true,
// generics: vec![],
// }
],
}
],
},
};
assert_eq!(
new_field,
field_info_without_another
)
}
```
--
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]