[Chore](storage) add debug info for TabletColumn::get_aggregate_function (#21408)
This commit is contained in:
@ -111,6 +111,10 @@ void MemTable::_init_agg_functions(const vectorized::Block* block) {
|
||||
} else {
|
||||
function =
|
||||
_tablet_schema->column(cid).get_aggregate_function(vectorized::AGG_LOAD_SUFFIX);
|
||||
if (function == nullptr) {
|
||||
LOG(WARNING) << "column get aggregate function failed, column="
|
||||
<< _tablet_schema->column(cid).name();
|
||||
}
|
||||
}
|
||||
|
||||
DCHECK(function != nullptr);
|
||||
|
||||
@ -506,7 +506,7 @@ vectorized::AggregateFunctionPtr TabletColumn::get_aggregate_function(std::strin
|
||||
std::string origin_name = TabletColumn::get_string_by_aggregation_type(_aggregation);
|
||||
auto type = vectorized::DataTypeFactory::instance().create_data_type(*this);
|
||||
|
||||
std::string agg_name = TabletColumn::get_string_by_aggregation_type(_aggregation) + suffix;
|
||||
std::string agg_name = origin_name + suffix;
|
||||
std::transform(agg_name.begin(), agg_name.end(), agg_name.begin(),
|
||||
[](unsigned char c) { return std::tolower(c); });
|
||||
|
||||
@ -515,6 +515,11 @@ vectorized::AggregateFunctionPtr TabletColumn::get_aggregate_function(std::strin
|
||||
if (function) {
|
||||
return function;
|
||||
}
|
||||
if (type->get_type_as_primitive_type() != PrimitiveType::TYPE_AGG_STATE) {
|
||||
LOG(WARNING) << "get column aggregate function failed, aggregation_name=" << origin_name
|
||||
<< ", column_type=" << type->get_name();
|
||||
return nullptr;
|
||||
}
|
||||
return get_aggregate_function_union(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user