gengliangwang commented on PR #55940:
URL: https://github.com/apache/spark/pull/55940#issuecomment-4482623412

   Addressed in c13127edf81, thanks @viirya:
   
   - **Class renamed** `DateTimeConstructorUtils` → `MakeDateAndIntervalUtils`. 
The new name matches the current contents (only `makeDateExact` + 
`makeIntervalExact`) and avoids the magnet-class risk you flagged. If future 
PRs add more constructor-style helpers, we can rename again at that point.
   - **`makeDateExact` javadoc tightened** to clarify it only catches the 
`DateTimeException` thrown by `LocalDate.of(...)` for invalid year/month/day. 
Anything else (e.g. the `ArithmeticException` from 
`DateTimeUtils.localDateToDays`'s internal `toIntExact` on day-count overflow) 
propagates to the caller unchanged.
   - **`secFrac` fallback fixed.** Replaced both branches' `sec.getOrElse("…")` 
(the non-ANSI's `"0"` was the wrong Java type anyway) with `sec.get` plus a 
comment noting that `MakeInterval` always passes 7 children — the auxiliary 
`this(…)` constructors fill missing slots with `Literal(0)` / 
`Literal(Decimal(0, …))`, so `SeptenaryExpression.nullSafeCodeGen` always 
provides `Some(…)` to the lambda.
   
   PTAL.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to