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

[C++][Python] FixedSizeListArray.flatten() ignores slicing offsets

    XMLWordPrintableJSON

Details

    Description

      Related to ARROW-7362, which is not resolved for fixed size arrays:

      import pyarrow as pa
      
      array = pa.array([[1], [2], [3]], type=pa.list_(pa.float64(), list_size=1))
      assert array[2:].flatten() != array.flatten()  # <-- assertion fails
      
      # expected behavior
      assert array[2:].flatten() == pa.array([3], type=pa.float64())

      Variable size lists behave as expected:

      array = pa.array([[1], [2], [3]], type=pa.list_(pa.float64()))
      assert array[2:].flatten() != array.flatten()  # pass
      assert array[2:].flatten() == pa.array([3], type=pa.float64())  # pass

      Attachments

        Issue Links

          Activity

            People

              milesgranger Miles Granger
              mosalx Sergey Mozharov
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 1h 50m
                  1h 50m