diff --git a/be/src/vec/columns/column_object.cpp b/be/src/vec/columns/column_object.cpp index d67a70d2f630f0..3d6a3e44436d29 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 e4127197a22b02..037656508e2a7f 100644 --- a/be/src/vec/columns/column_object.h +++ b/be/src/vec/columns/column_object.h @@ -428,7 +428,7 @@ class ColumnObject final : public COWHelper { 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;