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

[Python] pa.array() does not handle list of dicts with bytes keys correctly under python3

    XMLWordPrintableJSON

Details

    Description

      It creates sub-arrays with nulls filled, instead of the provided values.

      $ python

      Python 3.6.8 (default, Jan 3 2019, 03:42:36)
      [GCC 8.2.0] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import pyarrow as pa
      >>> pa._version_
      '0.15.0'
      >>> a = pa.array([{b"a": [1, 2, 3]}])
      >>> a
      <pyarrow.lib.StructArray object at 0x7fdcb4c28168>
      – is_valid: all not null
      – child 0 type: list<item: int64>
      [
      null
      ]
      >>> a = pa.array([{"a": [1, 2, 3]}])
      >>> a
      <pyarrow.lib.StructArray object at 0x7fdcb4c28108>
      – is_valid: all not null
      – child 0 type: list<item: int64>
      [
      [
      1,
      2,
      3
      ]
      ]

       

      It works under python2.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              brillsp Zhuo Peng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m