apache / apache/arrow

[C++][Python] strptime fails to parse with %p on Windows

Open
#31,971 6 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

As reported in https://github.com/apache/arrow/issues/13111 parsing a timestamp with %p will fail on Windows. This is probably due to issues with vendored strptime on Windows locales.
We should explore which flags can be enabled and how. Strptime tests suite should be expanded https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_string_test.cc#L1842-L1890.

**Reporter**: [Rok Mihevc](https://issues.apache.org/jira/browse/ARROW-16618) / @rok
**Watchers**: [Rok Mihevc](https://issues.apache.org/jira/browse/ARROW-16618) / @rok
#### Related issues:
- [[C++] Strptime issues umbrella](https://github.com/apache/arrow/issues/31324) (is a child of)
- [[C++][R] strptime fails to parse with %b or %B on Windows](https://github.com/apache/arrow/issues/31816) (relates to)

**Note**: *This issue was originally created as [ARROW-16618](https://issues.apache.org/jira/browse/ARROW-16618). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the strptime tests in cpp/src/arrow/compute/kernels/scalar_string_test.cc, especially lines 1842-1890, and compare the related Windows locale issue in #31816. Investigate which flags can be enabled for the vendored strptime implementation on Windows. Done means expanded tests cover parsing with %p and pass on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.