github-actions[bot] commented on code in PR #65319:
URL: https://github.com/apache/doris/pull/65319#discussion_r3577764500
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/DateTimeLiteral.java:
##########
@@ -498,7 +493,7 @@ public LocalDateTime toJavaDateType() {
((int) getHour()), ((int) getMinute()), ((int) getSecond()),
(int) getMicroSecond() * 1000);
}
- public static Expression fromJavaDateType(LocalDateTime dateTime) {
+ public static DateTimeLiteral fromJavaDateType(LocalDateTime dateTime, int
precision) {
if (isDateOutOfRange(dateTime)) {
Review Comment:
These v1 datetime helpers still call
`fromJavaDateType(toJavaDateType().plus...)` with one argument. After this
change, `DateTimeLiteral` no longer defines that overload, so those calls
resolve to the inherited `DateLiteral.fromJavaDateType(LocalDateTime)`, which
constructs a date-only literal. For example, `new DateTimeLiteral("2024-01-01
12:00:00").plusHours(1)` now returns `2024-01-01` instead of a v1 datetime
preserving `13:00:00`; `TimeRoundSeries.getDateCeilOrFloor` can then return
`null` because it requires `result instanceof DateTimeLiteral`. Please restore
the one-argument `DateTimeLiteral` overload or update the v1 `plus*` helpers to
call this two-argument overload, and add a focused v1 datetime
arithmetic/rounding test.
--
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]