Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17839

[Python] Cannot create RecordBatch with nested struct containing extension type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 9.0.0
    • None
    • Python
    • None
    • macOS 12.5.1 on an Apple M1 Ultra.

    Description

      I'm running into the following issue:

      pyarrow.lib.ArrowNotImplementedError: Unsupported cast to extension<vast.address<AddressType>> from fixed_size_binary[16]

      Use case: I want to create a record batch that contains this type:

      pa.struct([("address", AddressType()), ("length", pa.uint8())])

      Here, AddressType is an extension type that models an IP address (pa.binary(16)).

      Please find attached a self-contained example that illustrates the issue.

       

      Attachments

        1. example.py
          5 kB
          Matthias Vallentin
        2. enum.py
          2 kB
          Matthias Vallentin

        Activity

          People

            Unassigned Unassigned
            mavam Matthias Vallentin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: