Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Part of apache/datafusion#22033.
To unify granularity and field-name parsing across temporal functions we can reuse the arrow_arith::temporal::DatePart enum.
To do so, we need to add a parser - DatePart::from_str
Describe the solution you'd like
- Add a
DatePart::from_str API
Describe alternatives you've considered
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Part of apache/datafusion#22033.
To unify granularity and field-name parsing across temporal functions we can reuse the
arrow_arith::temporal::DatePartenum.To do so, we need to add a parser -
DatePart::from_strDescribe the solution you'd like
DatePart::from_strAPIDescribe alternatives you've considered
Additional context