alamb commented on issue #781: URL: https://github.com/apache/arrow-datafusion/issues/781#issuecomment-887495739
> This may be related to the fact that both the dict and the values are nullable. I do not know how the builder is populating the validity, but there is both array.keys().nulls() and array.values().nulls() around. Thanks @jorgecarleitao ! In my investigation, I believe the issue is that the values in array.keys() are marked as invalid, but the code that unpacks dictonaries into `ScalarValues` (which I wrote 🤦 ), for example https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/hash_aggregate.rs#L504 does not check `is_valid` (and there are at least three such places). I am digging in more now ``` The keys array[0]: 0, valid(true) array[1]: 0, valid(false) array[2]: 0, valid(true) array[3]: 1, valid(true) array[4]: 2, valid(true) array[5]: 0, valid(false) The values array[0]: "b", valid(true) array[1]: "a", valid(true) array[2]: "c", valid(true) The array: array[0]: "b", valid(true) array[1]: "", valid(false) array[2]: "b", valid(true) array[3]: "a", valid(true) array[4]: "c", valid(true) array[5]: "", valid(false) ``` -- 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]
