You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Hyun S (Jira)" <ji...@apache.org> on 2022/08/08 01:53:00 UTC

[jira] [Created] (ARROW-17333) Unsupported cast using function cast_struct

Hyun S created ARROW-17333:
------------------------------

             Summary: Unsupported cast using function cast_struct
                 Key: ARROW-17333
                 URL: https://issues.apache.org/jira/browse/ARROW-17333
             Project: Apache Arrow
          Issue Type: Bug
    Affects Versions: 9.0.0
            Reporter: Hyun S


Casting of structs that were introduced in ARROW-1888 no longer seems to work on the new 9.0.0 release. However, works on the older 8.0.0 release.
I've included the same example given in ARROW-1888 to reproduce the error.

 

Steps to reproduce:{{{}{}}}

{{arr = pa.array([\{'a': 1, 'b': None}, \{'a': 2, 'b': None}])}}
{{print(arr.type)}}
{{arr.cast(pa.struct([('a', pa.int64()), ('b', pa.int64())]))}}

 

Expected:

{{<pyarrow.lib.StructArray object at 0x7fb475f0e460> -- is_valid: all not null -- child 0 type: int64 [ 1, 2 ] -- child 1 type: int64 [ null, null ] }}

 

Actual Results:

{{ArrowNotImplementedError: Unsupported cast from struct<a: int64, b: null> to struct using function cast_struct}}

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)