naive fix

This commit is contained in:
Arthur Passos 2024-09-25 17:06:44 -03:00
parent 9e12b6cb4e
commit b55c2df393
3 changed files with 15 additions and 0 deletions

View File

@ -40,6 +40,10 @@ Field zeroField(const Field & value)
case Field::Types::Int128: return static_cast<Int128>(0);
case Field::Types::UInt256: return static_cast<UInt256>(0);
case Field::Types::Int256: return static_cast<Int256>(0);
case Field::Types::Decimal32: return static_cast<Decimal32>(0);
case Field::Types::Decimal64: return static_cast<Decimal64>(0);
case Field::Types::Decimal128: return static_cast<Decimal128>(0);
case Field::Types::Decimal256: return static_cast<Decimal256>(0);
default:
break;
}

View File

@ -0,0 +1 @@
0.131

View File

@ -0,0 +1,10 @@
-- Tags: no-parallel
DROP TABLE IF EXISTS users_03236_zero;
CREATE TABLE users_03236_zero (uid Int16, name String, num Int16) ENGINE=Memory;
INSERT INTO users_03236_zero VALUES (1231, 'John', 33);
INSERT INTO users_03236_zero VALUES (6666, 'John', 48);
INSERT INTO users_03236_zero VALUES (8888, 'Alice', 50);
select sum(num/toDecimal256(1000, 18)) from users_03236_zero;