Rich-T-kid commented on code in PR #12043:
URL: https://github.com/apache/arrow-rs/pull/12043#discussion_r4469919553
##########
arrow-row/src/lib.rs:
##########
@@ -775,7 +781,20 @@ impl Codec {
match self {
Codec::Stateless => Ok(Encoder::Stateless),
Codec::Dictionary(converter, nulls) => {
- let values = array.as_any_dictionary().values().clone();
+ let dictionary = array.as_any_dictionary();
+ let values = dictionary.values();
+ if values.len() >= DICTIONARY_GATHER_MIN_VALUES
+ && values.len() >=
dictionary.len().saturating_mul(DICTIONARY_GATHER_RATIO)
Review Comment:
Fixed in 6269c5802d. Gathering is now opportunistic: if materializing the
values hits an offset or run-end overflow, row conversion falls back to
encoding the original dictionary values. Added a regression test using
RunEndEncoded<Int64, RunEndEncoded<Int16, Int32>>.
--
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]