andygrove opened a new issue, #7017:
URL: https://github.com/apache/arrow-rs/issues/7017
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
<!--
A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]
(This section helps Arrow developers understand the context and *why* for
this feature, in addition to the *what*)
-->
I started upgrading Comet to use the latest DataFusion/Arrow and saw that an
effort is being made to remove dict_id from arrow-rs `Field`.
It seems odd that arrow-java has dict_id as part of its field
representation, but we plan to remove it from arrow-rs.
I am not 100% sure but this may be problematic for Comet since we seem to
rely on the dictionary_id when passing arrays between Java and Rust. I did not
write this code and am not yet familiar with it, but in Rust we have:
```rust
let mut dict_id = 0;
let fields = arrays
.iter()
.enumerate()
.map(|(i, array)| match array.data_type() {
DataType::Dictionary(_, _) => {
let field = Field::new_dict(
format!("c{}", i),
array.data_type().clone(),
true,
dict_id,
false,
);
dict_id += 1;
field
}
_ => Field::new(format!("c{}", i), array.data_type().clone(),
true),
})
```
and then in Java:
```java
DictionaryEncoding dictionaryEncoding = vector.getField().getDictionary();
Dictionary dictionary =
dictionaryProvider.lookup(dictionaryEncoding.getId());
```
It will take me some time to get up to speed with how we are using this in
Comet, and if it is needed or not.
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
I would like more discussion on this before the field is removed.
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features
you've considered.
-->
**Additional context**
<!--
Add any other context or screenshots about the feature request 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]