[Bug](function) fix function define of Retention inconsist and change some static_cast to assert cast (#19455)

1. fix function define of `Retention` inconsist, this function return tinyint on `FE` and return uint8 on `BE`
2. make assert_cast support cast to derived
3. change some static cast to assert cast
4. support sum(bool)/avg(bool)
This commit is contained in:
Pxl
2023-05-15 11:50:02 +08:00
committed by GitHub
parent 5df5c77d39
commit 4eb2604789
31 changed files with 151 additions and 133 deletions

View File

@ -678,7 +678,9 @@ Status AggregationNode::_get_without_key_result(RuntimeState* state, Block* bloc
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());
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();