From 0f10751ee156bcd85869d66798e49281e230cbcb Mon Sep 17 00:00:00 2001 From: eldenmoon <15605149486@163.com> Date: Tue, 24 Sep 2024 11:14:53 +0800 Subject: [PATCH] [compability](variant) fix nullable serde during upgrading need to check nullable during serialization when upgrading to 3.0 --- be/src/vec/columns/column_object.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/be/src/vec/columns/column_object.cpp b/be/src/vec/columns/column_object.cpp index 71ff45c02e67b44..f05e7a282cad41c 100644 --- a/be/src/vec/columns/column_object.cpp +++ b/be/src/vec/columns/column_object.cpp @@ -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(column); + const auto* nullable = check_and_get_column(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(); }