Rich-T-kid commented on PR #10614: URL: https://github.com/apache/arrow-rs/pull/10614#issuecomment-5323481787
> > on a slightly unrelated note, > > @Jefffrey do you think `generic_bytes_dictionary_builder` could benefit from a `append_array()` method. it would take in a byte array (utf8/large/view/binary/...) and insert all of their elements into the dictionary at once instead of doing this in a loop. The goal is to squeeze out as much performance out of `cast(stringArray -> dictArray)` as possible. > > https://github.com/apache/arrow-rs/blob/a5845cc14b23dc680115c6b1e7e8dd2f724a0631/arrow-array/src/builder/generic_bytes_dictionary_builder.rs#L327 > > > > currently the cast kernal for `stringArr -> dictArray` is > > https://github.com/apache/arrow-rs/blob/a5845cc14b23dc680115c6b1e7e8dd2f724a0631/arrow-cast/src/cast/dictionary.rs#L506 > > > > which does this in a loop > > https://github.com/apache/arrow-rs/blob/a5845cc14b23dc680115c6b1e7e8dd2f724a0631/arrow-cast/src/cast/dictionary.rs#L524 > > if we can get some good numbers from this then would be worth exploring 👀 I'll look into it, ill also implement these todo's since they seem pretty simple https://github.com/apache/arrow-rs/blob/a5845cc14b23dc680115c6b1e7e8dd2f724a0631/arrow-cast/src/cast/dictionary.rs#L39 -- 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]
