aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraneporada <aneporada@ydb.tech>2023-09-13 19:29:09 +0300
committeraneporada <aneporada@ydb.tech>2023-09-13 20:54:40 +0300
commitd7ec40e4e4dd22abff68d38c902650ec90a620d7 (patch)
treee4b78bd6c08fd0faed3328ea04a8f7c9b70b317c
parent29e0da4a3b41858e1d5eb619d474e0225e63da3a (diff)
downloadydb-d7ec40e4e4dd22abff68d38c902650ec90a620d7.tar.gz
Fix SUM over block floats (result should be float, not double)
-rw-r--r--ydb/library/yql/minikql/comp_nodes/mkql_block_agg_sum.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_block_agg_sum.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_block_agg_sum.cpp
index e91762c2b6..7a663a2f45 100644
--- a/ydb/library/yql/minikql/comp_nodes/mkql_block_agg_sum.cpp
+++ b/ydb/library/yql/minikql/comp_nodes/mkql_block_agg_sum.cpp
@@ -623,7 +623,7 @@ std::unique_ptr<typename TTag::TPreparedAggregator> PrepareSum(TTupleType* tuple
sumRetType = TDataType::Create(NUdf::TDataType<ui64>::Id, env);
} else {
Y_ENSURE(typeInfo.Features & NYql::NUdf::EDataTypeFeatures::FloatType);
- sumRetType = TDataType::Create(NUdf::TDataType<double>::Id, env);
+ sumRetType = dataType;
}
sumRetType = TOptionalType::Create(sumRetType, env);
@@ -646,7 +646,7 @@ std::unique_ptr<typename TTag::TPreparedAggregator> PrepareSum(TTupleType* tuple
case NUdf::EDataSlot::Uint64:
return PrepareSumFixed<TTag, ui64, ui64>(sumRetType, isOptional, isScalar, filterColumn, argColumn);
case NUdf::EDataSlot::Float:
- return PrepareSumFixed<TTag, float, double>(sumRetType, isOptional, isScalar, filterColumn, argColumn);
+ return PrepareSumFixed<TTag, float, float>(sumRetType, isOptional, isScalar, filterColumn, argColumn);
case NUdf::EDataSlot::Double:
return PrepareSumFixed<TTag, double, double>(sumRetType, isOptional, isScalar, filterColumn, argColumn);
default: