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

[Python] Crash when schema and columns do not match

    XMLWordPrintableJSON

Details

    Description

      I get a segfault when the arrays do not match the schema. Running latest from HEAD ee9b1ba426e2f1f117cde8d8f4ba6fbe3be5674c

      
      sch = pa.schema([
        pa.field('a', pa.int64()),
        pa.field('b', pa.string()),
      ])
      rb = pa.RecordBatch.from_arrays([pa.array([1])], ['a'])
      t = pa.Table.from_batches([rb], sch)
      
      

      In[6]: t = pa.Table.from_batches([rb], sch)
      [mine:11188] *** Process received signal ***
      [mine:11188] Signal: Segmentation fault (11)
      [mine:11188] Signal code: Address not mapped (1)
      [mine:11188] Failing at address: 0x49
      [mine:11188] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x128e0)[0x7f89d7a578e0]
      [mine:11188] [ 1] /usr/local/lib/python3.6/dist-packages/pyarrow/libarrow.so.10(_ZNK5arrow17SimpleRecordBatch6columnEi+0x48)[0x7f896d651548]
      [mine:11188] [ 2] /usr/local/lib/python3.6/dist-packages/pyarrow/libarrow.so.10(_ZN5arrow5Table17FromRecordBatchesERKSt10shared_ptrINS_6SchemaEERKSt6vectorIS1_INS_11RecordBatchEESaIS8_EEPS1_IS0_E+0x48a)[0x7f896d65771a]
      [mine:11188] [ 3] /usr/local/lib/python3.6/dist-packages/pyarrow/lib.cpython-36m-x86_64-linux-gnu.so(+0x13e98c)[0x7f896dd8a98c]
      [mine:11188] [ 4] /usr/bin/python3.6[0x50c3e5]
      [mine:11188] [ 5] /usr/bin/python3.6(_PyEval_EvalFrameDefault+0x449)[0x50fad9]
      [mine:11188] [ 6] /usr/bin/python3.6[0x50dee7]
      [mine:11188] [ 7] /usr/bin/python3.6[0x51b2ea]

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              weazelb0y Joseph Toth
              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 - 1h 10m
                  1h 10m