fix bug, get_column_group_type_name may out of array

This commit is contained in:
obdev
2024-02-09 11:48:19 +00:00
committed by ob-robot
parent 836b714ac4
commit a9b32cffbd

View File

@ -13923,7 +13923,7 @@ void ObColumnGroupSchema::remove_all_cols() {
int ObColumnGroupSchema::get_column_group_type_name(ObString &readable_cg_name) const
{
int ret = OB_SUCCESS;
if (column_group_type_ > ObColumnGroupType::NORMAL_COLUMN_GROUP ||
if (column_group_type_ >= ObColumnGroupType::NORMAL_COLUMN_GROUP ||
column_group_type_ < ObColumnGroupType::DEFAULT_COLUMN_GROUP) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("receive not suppoted column group type", K(ret), K(column_group_type_));