This is an automated email from the ASF dual-hosted git repository.
zclllyybb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 915add164df [Opt](function) Remove datetime transfomers check in
release mode (#63003)
915add164df is described below
commit 915add164df70df326e93fac8a9810f14d0bc52f
Author: zclllyybb <[email protected]>
AuthorDate: Fri May 8 20:05:53 2026 +0800
[Opt](function) Remove datetime transfomers check in release mode (#63003)
only keep the check in debug mode to try to find potential invalid
datetime value written by extarnal scan
---
be/src/exprs/function/function_date_or_datetime_to_something.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/exprs/function/function_date_or_datetime_to_something.h
b/be/src/exprs/function/function_date_or_datetime_to_something.h
index 7ea3c29c2a9..6f0ee6fca26 100644
--- a/be/src/exprs/function/function_date_or_datetime_to_something.h
+++ b/be/src/exprs/function/function_date_or_datetime_to_something.h
@@ -37,13 +37,17 @@ struct Transformer {
vec_to.resize(size);
for (size_t i = 0; i < size; ++i) {
- //FIXME: seems external table still generates invalid
date/datetime. but where?
+ // Only check in debug mode. for external table there's risk to
write an invalid datetime. use this to find it.
+ // Not checked in RELEASE mode for performance considerations
+#ifndef NDEBUG
if (!vec_from[i].is_valid_date()) [[unlikely]] {
char buf[64];
vec_from[i].to_string(buf);
throw Exception(ErrorCode::INVALID_ARGUMENT, "Operation {}
meets invalid data: {}",
Transform::name, buf);
}
+#endif
+
auto res = Transform::execute(vec_from[i]);
if constexpr (is_date_type(ToPType) || ToPType ==
TYPE_TIMESTAMPTZ) {
vec_to[i] = res;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]