You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "spenczar (via GitHub)" <gi...@apache.org> on 2023/05/24 15:11:46 UTC

[GitHub] [arrow] spenczar commented on issue #35624: [Python] Can't provide Arrow array when filling nulls of a fixed size list array

spenczar commented on issue #35624:
URL: https://github.com/apache/arrow/issues/35624#issuecomment-1561345012

   Oh wow, `fill_null` works quite differently than I expected. Your example of passing it an array and it working _elementwise_ is very surprising to me! `fill_value`'s documentation is a bit misleading, then; it says
   
   > Replace each null element in values with fill_value. 
   
   But it _should_ say something like "Replace each null element in values with a corresponding element from fill_value." 
   
   That's not a perfect phrasing, since it's a bit complicated and hard to fit into a short sentence. As I understand it, the behavior is:
    - If `fill_value` is scalar-like, replace each null element in `values` with `fill_value`.
    - If `fill_value` is array-like, replace the `i`th null element in `values` with the `i`th element in `fill_value`.
   
   This issue seems to fracture into three issues:
    - `as_py` is too crude
    - documentation needs a tweak
    - can't make an explicit scalar element of a fixed-size list (which sounds kind of like https://github.com/apache/arrow/issues/18987, perhaps)
   
   Does that seem right?
   
   


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