tustvold commented on code in PR #4070:
URL: https://github.com/apache/arrow-rs/pull/4070#discussion_r1164524144
##########
arrow-schema/src/fields.rs:
##########
@@ -186,7 +187,18 @@ impl UnionFields {
T: IntoIterator<Item = i8>,
{
let fields = fields.into_iter().map(Into::into);
- type_ids.into_iter().zip(fields).collect()
+ let mut set = BitSet::with_capacity(128);
Review Comment:
Could we just use bit operations on a u128? It should both be faster and
avoid a dependency.
Something like (not tested)
```
let mut set = 0_u128;
...
let mask = 1_u128 << idx
if (set & mask) != 0 {
Err...
else {
set |= mask
}
```
--
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]