You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Yibo Cai (Jira)" <ji...@apache.org> on 2021/06/02 06:30:00 UTC

[jira] [Comment Edited] (ARROW-12906) [Python] `fill_null` called with a null value seg faults on non fixed-sized types.

    [ https://issues.apache.org/jira/browse/ARROW-12906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17354760#comment-17354760 ] 

Yibo Cai edited comment on ARROW-12906 at 6/2/21, 6:29 AM:
-----------------------------------------------------------

For the record, {{fill_value_scalar}} is not valid, and {{fill_value_scalar.value}} is {{nullptr}}, leads to string_view constructor crashes.
https://github.com/apache/arrow/blob/9b68458bbf0a63a0be867d15ee608ebac69704d8/cpp/src/arrow/compute/kernels/scalar_fill_null.cc#L165


was (Author: yibo):
For the record, below line returns nullptr because NullScalar is not derived from BaseBinaryScalar. It causes crash when later code dereferencing the returned nullptr.
https://github.com/apache/arrow/blob/9b68458bbf0a63a0be867d15ee608ebac69704d8/cpp/src/arrow/compute/kernels/scalar_fill_null.cc#L164

> [Python] `fill_null` called with a null value seg faults on non fixed-sized types.
> ----------------------------------------------------------------------------------
>
>                 Key: ARROW-12906
>                 URL: https://issues.apache.org/jira/browse/ARROW-12906
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Python
>    Affects Versions: 4.0.0
>         Environment: macOS, ubuntu
>            Reporter: A. Coady
>            Assignee: Yibo Cai
>            Priority: Major
>
>  
> {code:java}
> import pyarrow as pa 
> assert pa.array([0]).fill_null(None)
> pa.array([""]).fill_null(None) # crash  {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)