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 95c84cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions be/src/vec/columns/column_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,9 @@ 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);
if (nullable->is_null_at(row) || (path.empty() && nullable->get_data_at(row).empty())) {
const auto* nullable = check_and_get_column<ColumnNullable>(column);
if (nullable != nullptr &&
(nullable->is_null_at(row) || (path.empty() && nullable->get_data_at(row).empty()))) {
return Status::OK();
}
// TODO could cache the result of leaf nodes with it's path info
Expand Down

0 comments on commit 95c84cd

Please sign in to comment.