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

eldenmoon 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 012acf58a7f [improve](variant) only sanitize in debug mode (#45689)
012acf58a7f is described below

commit 012acf58a7fde1ca0117fb2b88a0d6a22b9a1447
Author: lihangyu <lihan...@selectdb.com>
AuthorDate: Fri Dec 20 12:16:00 2024 +0800

    [improve](variant) only sanitize in debug mode (#45689)
    
    1. could improve serialization performance
    2. check is incorrect, example int8 and int16 could be compatible
---
 be/src/vec/columns/column_object.cpp | 2 ++
 be/src/vec/columns/column_object.h   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/columns/column_object.cpp 
b/be/src/vec/columns/column_object.cpp
index d67a70d2f63..3d6a3e44436 100644
--- a/be/src/vec/columns/column_object.cpp
+++ b/be/src/vec/columns/column_object.cpp
@@ -1953,6 +1953,7 @@ std::string ColumnObject::debug_string() const {
 }
 
 Status ColumnObject::sanitize() const {
+#ifndef NDEBUG
     RETURN_IF_CATCH_EXCEPTION(check_consistency());
     for (const auto& subcolumn : subcolumns) {
         if (subcolumn->data.is_finalized()) {
@@ -1967,6 +1968,7 @@ Status ColumnObject::sanitize() const {
     }
 
     VLOG_DEBUG << "sanitized " << debug_string();
+#endif
     return Status::OK();
 }
 
diff --git a/be/src/vec/columns/column_object.h 
b/be/src/vec/columns/column_object.h
index e4127197a22..037656508e2 100644
--- a/be/src/vec/columns/column_object.h
+++ b/be/src/vec/columns/column_object.h
@@ -428,7 +428,7 @@ public:
 
     bool empty() const;
 
-    // Check if all columns and types are aligned
+    // Check if all columns and types are aligned, only in debug mode
     Status sanitize() const;
 
     std::string debug_string() const;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to