Commits

Benjamin Kietzman authored 8041ae5fa9a
ARROW-9107: [C++][Dataset] Support temporal partitioning fields Temporal types are parsed and formatted with (appropriate portions of) ISO 8601 format: | type | format | | |---|---|---| | `Date32` | YYYY-MM-DD | | | `Date64` | YYYY-MM-DD | technically has ms precision but logically is required to represent a whole number of days, so the implicitly zero-filled sub day portion is elided for simpler formatting | | `Time32(s)` | HH:MM:SS | | | `Time32(ms)` | HH:MM:SS.mmm | * | | `Time64(us)` | HH:MM:SS.uuuuuu | * | | `Time64(ns)` | HH:MM:SS.nnnnnnnnn | * | | `Timestamp(s)` | YYYY-MM-DD HH:MM:SS | | | `Timestamp(ms)` | YYYY-MM-DD HH:MM:SS.mmm | * | | `Timestamp(us)` | YYYY-MM-DD HH:MM:SS.uuuuuu | * | | `Timestamp(ns)` | YYYY-MM-DD HH:MM:SS.nnnnnnnnn | * | | `Duration(...)` | | Decimal digits of the numeric value, whatever the units. | \* NB: If the number of subseconds is zero then the decimal point and their count will be elided when formatting and are not required when parsing. Refactored some of the parse/format facilities: - `ParseContext` is removed in favor of using the downcast type (for example ParseTimestampContext is just a struct holder of a TimeUnit::type, so it can be replaced with a TimestampType). - Traits are added for easing detection of parse/format capability: `{is,enable_if}_{parseable,formattable}` Closes #7793 from bkietz/9107-temporal-partitions Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>