-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](nereids)prevent null pointer exception if datetime value overflows #39482
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 38165 ms
|
TPC-DS: Total hot run time: 190725 ms
|
ClickBench: Total hot run time: 31.03 s
|
run buildall |
TPC-H: Total hot run time: 38128 ms
|
TPC-DS: Total hot run time: 195911 ms
|
ClickBench: Total hot run time: 31.93 s
|
@@ -336,7 +336,7 @@ protected boolean checkDate() { | |||
} | |||
|
|||
protected static boolean isDateOutOfRange(LocalDateTime dateTime) { | |||
return dateTime.isBefore(START_OF_A_DAY) || dateTime.isAfter(END_OF_A_DAY); | |||
return dateTime.isBefore(START_OF_A_DAY) || dateTime.isAfter(END_OF_A_DAY) || dateTime == null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return dateTime.isBefore(START_OF_A_DAY) || dateTime.isAfter(END_OF_A_DAY) || dateTime == null; | |
return dateTime == null || dateTime.isBefore(START_OF_A_DAY) || dateTime.isAfter(END_OF_A_DAY); |
break; | ||
} | ||
} catch (Exception ex) { | ||
// do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exception is expensive, could we process it without try catch
f54c15b
to
b27f498
Compare
run buildall |
TPC-H: Total hot run time: 38313 ms
|
TPC-DS: Total hot run time: 190750 ms
|
ClickBench: Total hot run time: 31.29 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…lows (#39482) date and datetime literal's plusXXX method( plusDays, plusWeeks, plusMonths) may return NullLiteral, So we should only convert the return value to date or datetime literal when it's not a NullLiteral
…ows (apache#39676) pick from master apache#39482
date and datetime literal's plusXXX method( plusDays, plusWeeks, plusMonths) may return NullLiteral, So we should only convert the return value to date or datetime literal when it's not a NullLiteral