sdf-jkl commented on code in PR #9965:
URL: https://github.com/apache/arrow-rs/pull/9965#discussion_r3285699649
##########
arrow-arith/src/temporal.rs:
##########
@@ -118,6 +117,8 @@ impl FromStr for DatePart {
"isoweek" => Self::WeekISO,
"d" | "day" | "days" => Self::Day,
"dow" | "dayofweek" => Self::DayOfWeekSunday0,
+ "dayofweek1" => Self::DayOfWeekSunday1,
Review Comment:
The way it works now is by passing a string:
https://github.com/apache/datafusion/blob/077f08a9a6632324c95275dd15b5dd5b1f14006f/datafusion/spark/src/function/datetime/date_part.rs#L112-L138
for `dow` it's the same pass and an extra addition of 1.
```rust
"dow" => Ok(ExprSimplifyResult::Simplified(
date_part_expr + Expr::Literal(ScalarValue::Int32(Some(1)),
None),
)),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]