You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/22 16:19:58 UTC

[GitHub] [arrow-rs] helgikrs opened a new issue #847: Structs containing nested dictionaries don't serialize correctly to FB in IPC

helgikrs opened a new issue #847:
URL: https://github.com/apache/arrow-rs/issues/847


   A schema containing dictionary fields nested within structs does not round-trip properly through FB serialization/deserialization.
   
   Repro:
   
   ```rust
   use arrow::{
       datatypes::{DataType, Field, Schema},
       ipc::{
           self,
           convert::{fb_to_schema, schema_to_fb},
       },
   };
   use std::sync::Arc;
   
   fn main() {
       let schema = Arc::new(Schema::new(vec![Field::new(
           "struct<dictionary<int32, utf8>>",
           DataType::Struct(vec![Field::new(
               "dictionary<int32, utf8>",
               DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8)),
               false,
           )]),
           false,
       )]));
   
       let fb = schema_to_fb(&schema);
       let ipc = ipc::root_as_schema(fb.finished_data()).unwrap();
       let schema2 = fb_to_schema(ipc);
       assert_eq!(*schema, schema2);
   }
   ```
   
   ```console
   thread 'main' panicked at 'assertion failed: `(left == right)`
     left: `Schema { fields: [Field { name: "struct<dictionary<int32, utf8>>", data_type: Struct([Field { name: "dictionary<int32, utf8>", data_type: Dictionary(Int32, Utf8), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }], metadata: {} }`,
    right: `Schema { fields: [Field { name: "struct<dictionary<int32, utf8>>", data_type: Struct([Field { name: "dictionary<int32, utf8>", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }], metadata: {} }`', src/main.rs:26:5
   ```


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

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



[GitHub] [arrow-rs] alamb closed issue #847: Structs containing nested dictionaries don't serialize correctly to FB in IPC

Posted by GitBox <gi...@apache.org>.
alamb closed issue #847:
URL: https://github.com/apache/arrow-rs/issues/847


   


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

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