You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/09/18 20:34:48 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4833: Fix merge_dictionary_values in selection kernels

tustvold commented on code in PR #4833:
URL: https://github.com/apache/arrow-rs/pull/4833#discussion_r1329251238


##########
arrow-select/src/dictionary.rs:
##########
@@ -211,9 +213,10 @@ pub fn merge_dictionary_values<K: ArrowDictionaryKeyType>(
 fn compute_values_mask<K: ArrowNativeType>(
     keys: &ScalarBuffer<K>,
     mask: Option<&BooleanBuffer>,
+    max_key: usize,
 ) -> BooleanBuffer {
-    let mut builder = BooleanBufferBuilder::new(keys.len());

Review Comment:
   This is the bug, the length of the values_mask should match that of the values array not the keys. In all of the existing tests the number of keys outnumbered the number of values, not helped by the heuristic to trigger merging being based off the total number of keys outnumbering the total number of values.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org