Skip to content

Commit

Permalink
branch-2.1: [improve](variant) only sanitize in debug mode #45689 (#4…
Browse files Browse the repository at this point in the history
…5698)

Cherry-picked from #45689

Co-authored-by: lihangyu <[email protected]>
  • Loading branch information
github-actions[bot] and eldenmoon authored Dec 20, 2024
1 parent 7e5d880 commit 37c4de3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions be/src/vec/columns/column_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -1716,6 +1717,7 @@ Status ColumnObject::sanitize() const {
}

VLOG_DEBUG << "sanitized " << debug_string();
#endif
return Status::OK();
}

Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/columns/column_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class ColumnObject final : public COWHelper<IColumn, ColumnObject> {

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;
Expand Down

0 comments on commit 37c4de3

Please sign in to comment.