This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new c136fc2170e branch-4.1: [Opt](function) Remove datetime transfomers 
check in release mode #63003 (#63087)
c136fc2170e is described below

commit c136fc2170e04410bba79c3ff9373614ba35bcae
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat May 9 15:19:31 2026 +0800

    branch-4.1: [Opt](function) Remove datetime transfomers check in release 
mode #63003 (#63087)
    
    Cherry-picked from #63003
    
    Co-authored-by: zclllyybb <[email protected]>
---
 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]

Reply via email to