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

[Python] Segmentation fault from PyArrow when mapping Pandas datetime column to pyarrow.date64

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: Python
    • Environment:
      Mac OS High Sierra
      Python 3.6

      Description

      When trying to call `pyarrow.Table.from_pandas` with a `pandas.DataFrame` and a `pyarrow.Schema` provided, the function call results in a segmentation fault if Pandas `datetime64[ns]` column tries to be converted to a `pyarrow.date64` type.

      A minimal example which shows this is:

      import pandas as pd
      import pyarrow as pa
      
      df = pd.DataFrame({'created': ['2018-05-10T10:24:01']})
      df['created'] = pd.to_datetime(df['created'])}}
      schema = pa.schema([pa.field('created', pa.date64())])
      pa.Table.from_pandas(df, schema=schema)
      

      Executing the above causes the python interpreter to exit with "Segmentation fault: 11".

      Attempting to convert into various other datatypes (by specifying different schemas) either succeeds, or raises an exception if the conversion is invalid.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kszucs Krisztian Szucs
                Reporter:
                suicas Dave Challis
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: