You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Dragoș Moldovan-Grünfeld (Jira)" <ji...@apache.org> on 2022/05/23 11:57:00 UTC

[jira] [Created] (ARROW-16627) [C++] Support parsing of {{2020-01}} into {{2020-01-01}}

Dragoș Moldovan-Grünfeld created ARROW-16627:
------------------------------------------------

             Summary: [C++] Support parsing of {{2020-01}} into {{2020-01-01}}
                 Key: ARROW-16627
                 URL: https://issues.apache.org/jira/browse/ARROW-16627
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
    Affects Versions: 8.0.0
            Reporter: Dragoș Moldovan-Grünfeld


Originated as part of the [review|https://github.com/apache/arrow/pull/13196#discussion_r878229869] for the ARROW-16407 [PR|https://github.com/apache/arrow/pull/13196]. 

Currently we get a surprising output when parsing of {{%Y-%m}} strings such as {{"2020-01"}} - see reprex below.

{code:r}
library(arrow, warn.conflicts = FALSE)

call_function(
  "strptime",
  Array$create("2020-01"),
  options = list(
    format = "%Y-%m",
    unit = 0L
  )
)
#> Array
#> <timestamp[s]>
#> [
#>   2019-12-31 00:00:00
#> ]
{code}

I'm not sure if this would be useful somewhere else, but we could definitely use this to remove some workarounds in the R bindings. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)