From 220dcbab86b8df748be0005750c41da8fa97807b Mon Sep 17 00:00:00 2001 From: Krishna Pai Date: Thu, 14 Mar 2024 08:46:07 -0700 Subject: [PATCH] Remove implicit fall through. --- velox/functions/sparksql/aggregates/SumAggregate.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/velox/functions/sparksql/aggregates/SumAggregate.cpp b/velox/functions/sparksql/aggregates/SumAggregate.cpp index 6b992615df1f..777e52b0f3cb 100644 --- a/velox/functions/sparksql/aggregates/SumAggregate.cpp +++ b/velox/functions/sparksql/aggregates/SumAggregate.cpp @@ -113,12 +113,11 @@ exec::AggregateRegistrationResult registerSum( BIGINT()); } case TypeKind::HUGEINT: { - if (inputType->isLongDecimal()) { - // If inputType is long decimal, - // its output type is always long decimal. - return std::make_unique>>(resultType); - } + VELOX_CHECK(inputType->isLongDecimal()); + // If inputType is long decimal, + // its output type is always long decimal. + return std::make_unique>>(resultType); } case TypeKind::REAL: if (resultType->kind() == TypeKind::REAL) {