diff --git a/be/src/vec/aggregate_functions/aggregate_function_binary.h b/be/src/vec/aggregate_functions/aggregate_function_binary.h index ca06cc1bb8..a5b6e2b1e0 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_binary.h +++ b/be/src/vec/aggregate_functions/aggregate_function_binary.h @@ -41,8 +41,7 @@ template typename Moments> struct StatFunc { using Type1 = T1; using Type2 = T2; - using ResultType = std::conditional_t && std::is_same_v, - Float32, Float64>; + using ResultType = Float64; using Data = Moments; }; diff --git a/regression-test/data/nereids_function_p0/agg_function/test_corr.out b/regression-test/data/nereids_function_p0/agg_function/test_corr.out index 4fc9a9d4ba..c694f95ebe 100644 --- a/regression-test/data/nereids_function_p0/agg_function/test_corr.out +++ b/regression-test/data/nereids_function_p0/agg_function/test_corr.out @@ -11,3 +11,6 @@ -- !sql -- 0.8944271909999159 +-- !sql -- +0.8944271909999159 + diff --git a/regression-test/suites/nereids_function_p0/agg_function/test_corr.groovy b/regression-test/suites/nereids_function_p0/agg_function/test_corr.groovy index 15f27f8427..09ed98fab0 100644 --- a/regression-test/suites/nereids_function_p0/agg_function/test_corr.groovy +++ b/regression-test/suites/nereids_function_p0/agg_function/test_corr.groovy @@ -80,6 +80,7 @@ suite("test_corr") { (5, 5, 10) """ qt_sql "select corr(x,y) from test_corr" - + + qt_sql "select corr(cast(x as float),cast(y as float)) from test_corr" sql """ DROP TABLE IF EXISTS test_corr """ }