Open asfimport opened 2 years ago
Antoine Pitrou / @pitrou:
Well, the timestamp parser functionality is available in arrow/util/values_parsing.h
. You'll have to reimplement the logic to loop through parsers yourself, but that should be close to trivial.
Does this issue need to be kept open?
The
TimestampParser
seems to be able to cycle through several formats. This sort of functionality would be very useful for some of the lubridate bindings that need to behave in a similar way.For example, in lubridate, the
ymd()
cycles through all possible formats that have year-month-date components in the right order (e.g."%Y-%m-%d", "%y-%m-%d", "%Y-%b-%d", "%y-%b-%d", "%Y-%B-%d", "%y-%b-%d"
, etc).I guess my question is: Can we factor this CSV reader feature to be usable elsewhere? This was the bit that caught my attention: "using the virtual parser interface in arrow/util/value_parsing.h", and told me that using it elsewhere might be a possibility.
Reporter: Dragoș Moldovan-Grünfeld / @dragosmg
Related issues:
Note: This issue was originally created as ARROW-15912. Please see the migration documentation for further details.