[SKIP INDEX] NullCountAggregator init.
This commit is contained in:
@ -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())) {
|
if (is_skip_index_black_list_type(col_desc.col_type_.get_type())) {
|
||||||
set_not_aggregate();
|
set_not_aggregate();
|
||||||
}
|
}
|
||||||
|
col_desc_ = col_desc;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -73,6 +74,9 @@ int ObColNullCountAggregator::eval(const ObStorageDatum &datum, const bool is_da
|
|||||||
// Skip
|
// Skip
|
||||||
} else if (is_data) {
|
} else if (is_data) {
|
||||||
null_count_ += datum.is_null() ? 1 : 0;
|
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 {
|
} else {
|
||||||
null_count_ += datum.get_int();
|
null_count_ += datum.get_int();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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)
|
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_is_user_defined_sql_type(obj_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
OB_INLINE static bool is_skip_index_while_list_type(const ObObjType &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);
|
const ObObjTypeClass tc = ob_obj_type_class(obj_type);
|
||||||
return (ObNullTC <= tc && tc <= ObLobTC) || ObDecimalIntTC == tc;
|
return (ObIntTC <= tc && tc <= ObLobTC) || ObDecimalIntTC == tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // blocksstable
|
} // blocksstable
|
||||||
|
|||||||
Reference in New Issue
Block a user