linrrzqqq commented on code in PR #63605:
URL: https://github.com/apache/doris/pull/63605#discussion_r3302420318
##########
be/src/exprs/aggregate/aggregate_function_stddev.h:
##########
@@ -144,17 +134,12 @@ struct PopData : BaseData<T, is_stddev>, Name {
template <PrimitiveType T, typename Name, bool is_stddev>
struct SampData : BaseData<T, is_stddev>, Name {
- using ColVecResult = std::conditional_t<is_decimal(T), ColumnDecimal128V2,
ColumnFloat64>;
void insert_result_into(IColumn& to) const {
- auto& col = assert_cast<ColVecResult&>(to);
+ auto& col = assert_cast<ColumnFloat64&>(to);
if (this->count == 1 || this->count == 0) {
- col.insert_default();
+ col.get_data().push_back(std::nan(""));
} else {
- if constexpr (is_decimal(T)) {
- col.get_data().push_back(this->get_samp_result().value());
Review Comment:
PR description modified
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]