This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 37c4de3cbf5 branch-2.1: [improve](variant) only sanitize in debug mode
#45689 (#45698)
37c4de3cbf5 is described below
commit 37c4de3cbf557ccfb22efa7b5568415ee79fc0b9
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Dec 20 14:25:49 2024 +0800
branch-2.1: [improve](variant) only sanitize in debug mode #45689 (#45698)
Cherry-picked from #45689
Co-authored-by: lihangyu <[email protected]>
---
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 05f1bdb13a0..47dbb14d377 100644
--- a/be/src/vec/columns/column_object.cpp
+++ b/be/src/vec/columns/column_object.cpp
@@ -1702,6 +1702,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()) {
@@ -1716,6 +1717,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 20848e9d0af..43e5301f030 100644
--- a/be/src/vec/columns/column_object.h
+++ b/be/src/vec/columns/column_object.h
@@ -454,7 +454,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: [email protected]
For additional commands, e-mail: [email protected]