viirya commented on issue #1694:
URL: https://github.com/apache/arrow-rs/issues/1694#issuecomment-1137941649
Oh, that is because in your `build_batch` method, you create `Field` by:
```rust
fields.push(Field::new("as", array.data_type().clone(), true));
...
fields.push(Field::new("bs", array.data_type().clone(), true));
```
`dict_id` in `Field` is default to be 0.
So you duplicate dictionary ids.
I changed the code to the follows, and ran the C++ program without any issue:
```rust
fields.push(Field::new_dict("as", array.data_type().clone(), true, 0,
false));
...
fields.push(Field::new_dict("bs", array.data_type().clone(), true, 1,
false));
```
--
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]