mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
naive fix
This commit is contained in:
parent
9e12b6cb4e
commit
b55c2df393
@ -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;
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
0.131
|
10
tests/queries/0_stateless/03236_test_zero_field_decimal.sql
Normal file
10
tests/queries/0_stateless/03236_test_zero_field_decimal.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user