[SKIP INDEX] NullCountAggregator init.

This commit is contained in:
Hooper9973
2023-11-17 02:41:12 +00:00
committed by ob-robot
parent bba5d3f21e
commit 565ab7b15b
2 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,7 @@ int ObColNullCountAggregator::init(const ObColDesc &col_desc, ObStorageDatum &re
if (is_skip_index_black_list_type(col_desc.col_type_.get_type())) {
set_not_aggregate();
}
col_desc_ = col_desc;
}
return ret;
}
@ -73,6 +74,9 @@ int ObColNullCountAggregator::eval(const ObStorageDatum &datum, const bool is_da
// Skip
} else if (is_data) {
null_count_ += datum.is_null() ? 1 : 0;
} else if (datum.is_null()) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("Unexpected index block data", K(ret), K(datum));
} else {
null_count_ += datum.get_int();
}

View File

@ -156,14 +156,14 @@ OB_INLINE static int get_skip_index_store_upper_size(
OB_INLINE static bool is_skip_index_black_list_type(const ObObjType &obj_type)
{
return ob_is_json_tc(obj_type) || ob_is_geometry_tc(obj_type)
return ObNullType == obj_type || ob_is_json_tc(obj_type) || ob_is_geometry_tc(obj_type)
|| ob_is_user_defined_sql_type(obj_type);
}
OB_INLINE static bool is_skip_index_while_list_type(const ObObjType &obj_type)
{
const ObObjTypeClass tc = ob_obj_type_class(obj_type);
return (ObNullTC <= tc && tc <= ObLobTC) || ObDecimalIntTC == tc;
return (ObIntTC <= tc && tc <= ObLobTC) || ObDecimalIntTC == tc;
}
} // blocksstable