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

   > 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
   
   Yeah, that's indeed certainly not properly documented. I am not sure this 
was fully intentional (maybe when it was added, mostly the scalar fill_value 
was considered), but this is essentially an alias for `coalesce`, and it is 
this function that supports this behaviour. 
   And also for example `fillna` in pandas has the same ability of either 
filling with a scalar or filling with the corresponding values of a same-length 
array.
   
   Your suggested rewording sounds good!
   
   > This issue seems to fracture into three issues:
   
   Yes, that's a good summary. 
   
   > 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)
   
   That's indeed a related issue. It's also related to 
https://github.com/apache/arrow/issues/21761, for accepting pyarrow values in 
`pa.array(..)` constructor (and not `pa.scalar(..)`). For this one, there is an 
open PR, but it will probably depend on how that PR implements the fix whether 
that would also fix the scalar() version (we don't call `pa.array(..)` inside 
`pa.scalar(..)`, but directly the lower level `ConvertPySequence`).


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