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

[C++][Python] strptime fails to parse subsecond timestamps

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.0.0
    • None
    • C++, Python
    • None

    Description

       

      >>> import pyarrow.compute as pc
      >>> pc.strptime('13:13:30', format='%H:%M:%S', unit='s')
      <pyarrow.TimestampScalar: datetime.datetime(1899, 12, 31, 13, 13, 30)>
      >>> pc.strptime('13:13:30.255', format='%H:%M:%S.%f', unit='ms')
      Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File "/usr/local/lib/python3.6/dist-packages/pyarrow/compute.py", line 140, in wrapper
       return func.call([arg], options, memory_pool)
       File "pyarrow/_compute.pyx", line 275, in pyarrow._compute.Function.call
       File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
       File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
      pyarrow.lib.ArrowInvalid: Failed to parse string 13:13:30.255
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ktaras Taras Kuzyo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment