Skip to content

Commit

Permalink
[refactor](variant) remove duplicated and trivial sanitize
Browse files Browse the repository at this point in the history
1. could improve serialization performance
2. check is incorrect, example int8 and int16 could be compatible
  • Loading branch information
eldenmoon committed Dec 20, 2024
1 parent 6283f45 commit 79aa7bf
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 @@ -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()) {
Expand All @@ -1967,6 +1968,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 @@ -428,7 +428,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 79aa7bf

Please sign in to comment.