XiangpengHao opened a new issue, #7058:
URL: https://github.com/apache/arrow-rs/issues/7058

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   The following test case should pass, but it errors:
   
   ```
   thread 'tests::test_dict_schema' panicked at arrow-flight/src/lib.rs:851:56:
   called `Result::unwrap()` on an `Err` value: ParseError("Unable to convert 
flight info to a message: Type `i64` at position 100 is unaligned.\n\twhile 
verifying table field `id` at position 100\n\twhile verifying table field 
`dictionary` at position 76\n\twhile verifying vector element 1 at position 
56\n\twhile verifying table field `fields` at position 44\n\t while verifying 
union variant `MessageHeader::Schema` at position 24\n\twhile verifying table 
field `header` at position 24\n\n")
   ```
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   ```rust
       #[test]
       fn test_dict_schema() {
           let schema = Schema::new(vec![
               Field::new(
                   "a",
                   DataType::Dictionary(Box::new(DataType::UInt16), 
Box::new(DataType::Utf8)),
                   false,
               ),
               Field::new(
                   "b",
                   DataType::Dictionary(Box::new(DataType::UInt16), 
Box::new(DataType::Utf8)),
                   false,
               ),
           ]);
   
           let flight_info = 
FlightInfo::new().try_with_schema(&schema).unwrap();
   
           let new_schema = Schema::try_from(flight_info).unwrap();
           assert_eq!(schema, new_schema);
       }
   ```
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   If the schema only has one dictionary, it would work just fine.
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


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