diff --git a/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.cpp b/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.cpp index de0eca15e76..e465f11caad 100644 --- a/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.cpp +++ b/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.cpp @@ -18,6 +18,8 @@ #include #include +#include + namespace DB::DM { @@ -38,10 +40,17 @@ void DMFilePackFilter::init(ReadTag read_tag) if (!rowkey_ranges.empty()) { bool is_common_handle = rowkey_ranges.begin()->is_common_handle; + auto handle_col_type = dmfile->getColumnStat(EXTRA_HANDLE_COLUMN_ID).type; if (is_common_handle) - RUNTIME_CHECK(dmfile->getColumnStat(EXTRA_HANDLE_COLUMN_ID).type->getTypeId() == TypeIndex::String); + RUNTIME_CHECK_MSG( + handle_col_type->getTypeId() == TypeIndex::String, + "handle_col_type_id={}", + magic_enum::enum_name(handle_col_type->getTypeId())); else - RUNTIME_CHECK(dmfile->getColumnStat(EXTRA_HANDLE_COLUMN_ID).type->getTypeId() == TypeIndex::Int64); + RUNTIME_CHECK_MSG( + handle_col_type->getTypeId() == TypeIndex::Int64, + "handle_col_type_id={}", + magic_enum::enum_name(handle_col_type->getTypeId())); for (size_t i = 1; i < rowkey_ranges.size(); ++i) { RUNTIME_CHECK_MSG(