scovich opened a new issue, #8289:
URL: https://github.com/apache/arrow-rs/issues/8289

   **Describe the bug**
   
   While trying to refactor `cast_to_variant` to be more efficient, I noticed 
that the logic for maps does not check for NULL entries. It only looks at the 
offsets, which technically only say how many entries the map has.
   
   **To Reproduce**
   
   `test_cast_map_to_variant_object_with_nulls` produces a `MapArray` with no 
NULL rows, and the test expects a NULL output for the row that had an empty map.
   
   **Expected behavior**
   
   The test should produce a `MapArray` where one row is an empty map and 
another row is NULL; the former should become a variant object with no fields 
and the other should become NULL or Variant::Null (depending on whether the map 
is top-level or nested inside another variant value).


-- 
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]

Reply via email to