[Enchancement](Agg State) storage function name and result is nullable in agg state type (#20298)

storage function name and result is nullable in agg state type
This commit is contained in:
Pxl
2023-06-04 22:44:48 +08:00
committed by GitHub
parent e6f395c9da
commit 8e39f0cf6b
25 changed files with 386 additions and 154 deletions

View File

@ -668,13 +668,12 @@ Status AggregationNode::_get_without_key_result(RuntimeState* state, Block* bloc
const auto column_type = block_schema[i].type;
if (!column_type->equals(*data_types[i])) {
if (!is_array(remove_nullable(column_type))) {
DCHECK(column_type->is_nullable());
DCHECK(!data_types[i]->is_nullable())
<< " column type: " << column_type->get_name()
<< ", data type: " << data_types[i]->get_name();
DCHECK(remove_nullable(column_type)->equals(*data_types[i]))
<< " column type: " << remove_nullable(column_type)->get_name()
<< ", data type: " << data_types[i]->get_name();
if (!column_type->is_nullable() || data_types[i]->is_nullable() ||
!remove_nullable(column_type)->equals(*data_types[i])) {
return Status::InternalError(
"column_type not match data_types, column_type={}, data_types={}",
column_type->get_name(), data_types[i]->get_name());
}
}
ColumnPtr ptr = std::move(columns[i]);