mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #40683 from ClickHouse/test-to-decimal-or-default
Add a test for toDecimal*OrDefault functions
This commit is contained in:
commit
b4cf54e3ef
@ -0,0 +1,8 @@
|
||||
111 Decimal(9, 3)
|
||||
222 Decimal(18, 3)
|
||||
333 Decimal(38, 3)
|
||||
444 Decimal(76, 3)
|
||||
123.456 Decimal(9, 3)
|
||||
123.456 Decimal(18, 3)
|
||||
123.456 Decimal(38, 3)
|
||||
123.456 Decimal(76, 3)
|
@ -0,0 +1,9 @@
|
||||
SELECT toDecimal32OrDefault(111, 3, 123.456::Decimal32(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal64OrDefault(222, 3, 123.456::Decimal64(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal128OrDefault(333, 3, 123.456::Decimal128(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal256OrDefault(444, 3, 123.456::Decimal256(3)) AS x, toTypeName(x);
|
||||
|
||||
SELECT toDecimal32OrDefault('Hello', 3, 123.456::Decimal32(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal64OrDefault('Hello', 3, 123.456::Decimal64(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal128OrDefault('Hello', 3, 123.456::Decimal128(3)) AS x, toTypeName(x);
|
||||
SELECT toDecimal256OrDefault('Hello', 3, 123.456::Decimal256(3)) AS x, toTypeName(x);
|
Loading…
Reference in New Issue
Block a user