Skip to content

Commit

Permalink
[compability](variant) fix nullable serde during upgrading
Browse files Browse the repository at this point in the history
need to check nullable during serialization when upgrading to 3.0
  • Loading branch information
eldenmoon committed Sep 24, 2024
1 parent ff6f17c commit 0f10751
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion be/src/vec/columns/column_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,12 @@ Status find_and_set_leave_value(const IColumn* column, const PathInData& path,
"failed to set value for path {}, expected type {}, but got {} at row {}",
path.get_path(), type->get_name(), column->get_name(), row);
}
const auto* nullable = assert_cast<const ColumnNullable*>(column);
const auto* nullable = check_and_get_column<ColumnNullable>(column);
if (!nullable) {
return Status::InternalError("failed to set value for path {}, expected nullable column, but "
"got {} at row {}",
path.get_path(), column->get_name(), row);
}
if (nullable->is_null_at(row) || (path.empty() && nullable->get_data_at(row).empty())) {
return Status::OK();
}
Expand Down

0 comments on commit 0f10751

Please sign in to comment.