[Bug] Fix bug that the min/max function has an error in handling string null values. (#5189)

null should be ignored in min/max function.
And if there is no data, null should be return.

Co-authored-by: morningman <chenmingyu@baidu.com>
This commit is contained in:
Mingyu Chen
2021-01-05 09:48:38 +08:00
committed by GitHub
parent dd5f8f2a0f
commit 03e36056eb

View File

@ -300,6 +300,7 @@ struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_MAX, OLAP_FIELD_TYPE_VARCHAR>
memory_copy(dst_slice->data, src_slice->data, src_slice->size);
dst_slice->size = src_slice->size;
}
dst->set_is_null(false);
}
}
};