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

[C++/Python] PyDataTime_Date wrongly casted to PyDataTime_DateTime

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.15.0
    • C++, Python

    Description

      As mentioned in https://bitbucket.org/pypy/pypy/issues/2842/running-pyarrow-on-pypy-segfaults#comment-50670536, we currently access a PyDataTime_Date object with a PyDataTime_DateTime cast in PyDateTime_DATE_GET_SECOND in our code in two instances. While CPython is able to deal with this wrong usage, PyPy is not able to do so. We should separate the path here into one that deals with dates and another that deals with datetimes.

      Reproducible code:

      pa.array([datetime.date(2018, 5, 10)], type=pa.date64())

      Attachments

        Issue Links

          Activity

            People

              emkornfield@gmail.com Micah Kornfield
              uwe Uwe Korn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: