diff options
author | aneporada <aneporada@ydb.tech> | 2023-09-13 19:29:09 +0300 |
---|---|---|
committer | aneporada <aneporada@ydb.tech> | 2023-09-13 20:54:40 +0300 |
commit | d7ec40e4e4dd22abff68d38c902650ec90a620d7 (patch) | |
tree | e4b78bd6c08fd0faed3328ea04a8f7c9b70b317c | |
parent | 29e0da4a3b41858e1d5eb619d474e0225e63da3a (diff) | |
download | ydb-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.cpp | 4 |
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: |