diff --git a/be/src/vec/exec/format/parquet/byte_array_dict_decoder.cpp b/be/src/vec/exec/format/parquet/byte_array_dict_decoder.cpp index 8b9532e68d0391..7c3d15b7c21d95 100644 --- a/be/src/vec/exec/format/parquet/byte_array_dict_decoder.cpp +++ b/be/src/vec/exec/format/parquet/byte_array_dict_decoder.cpp @@ -32,6 +32,9 @@ namespace doris::vectorized { Status ByteArrayDictDecoder::set_dict(std::unique_ptr& dict, int32_t length, size_t num_values) { _dict = std::move(dict); + if (_dict == nullptr) { + return Status::Corruption("Wrong dictionary data for byte array type, dict is null."); + } _dict_items.reserve(num_values); uint32_t offset_cursor = 0; char* dict_item_address = reinterpret_cast(_dict.get()); diff --git a/be/src/vec/exec/format/parquet/fix_length_dict_decoder.hpp b/be/src/vec/exec/format/parquet/fix_length_dict_decoder.hpp index 65e329ae89b5a4..3024405c2953fa 100644 --- a/be/src/vec/exec/format/parquet/fix_length_dict_decoder.hpp +++ b/be/src/vec/exec/format/parquet/fix_length_dict_decoder.hpp @@ -107,6 +107,9 @@ class FixLengthDictDecoder final : public BaseDictDecoder { return Status::Corruption("Wrong dictionary data for fixed length type"); } _dict = std::move(dict); + if (_dict == nullptr) { + return Status::Corruption("Wrong dictionary data for byte array type, dict is null."); + } char* dict_item_address = reinterpret_cast(_dict.get()); _dict_items.resize(num_values); _dict_value_to_code.reserve(num_values);