ClickHouse/tests/queries/0_stateless/01852_cast_operator.reference

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
969 B
Plaintext
Raw Normal View History

2021-08-15 07:53:46 +00:00
0.1
2021-05-06 18:21:10 +00:00
SELECT CAST(\'0.1\', \'Decimal(38, 38)\') AS c
[1,2,3]
SELECT CAST(\'[1, 2, 3]\', \'Array(UInt32)\') AS c
abc
SELECT CAST(\'abc\', \'FixedString(3)\') AS c
123
SELECT CAST(\'123\', \'String\') AS c
1
SELECT CAST(\'1\', \'Int8\') AS c
[1,2,3]
SELECT CAST([1, 1 + 1, 1 + 2], \'Array(UInt32)\') AS c
2010-10-10
SELECT CAST(\'2010-10-10\', \'Date\') AS c
2010-10-10 00:00:00
SELECT CAST(\'2010-10-10\', \'DateTime(\\\'UTC\\\')\') AS c
2021-05-06 18:21:10 +00:00
['2010-10-10','2010-10-10']
SELECT CAST(\'[\\\'2010-10-10\\\', \\\'2010-10-10\\\']\', \'Array(Date)\')
3
SELECT CAST(1 + 2, \'UInt32\') AS c
0.5
SELECT CAST(CAST(\'0.1\', \'Decimal(4, 4)\') * 5, \'Float64\') AS c
2021-05-04 03:43:17 +00:00
0 UInt8
SELECT
CAST(number, \'UInt8\') AS c,
toTypeName(c)
FROM numbers(1)
2021-05-06 18:21:10 +00:00
1970-01-11
SELECT CAST((((0 + 1) + 2) + 3) + 4, \'Date\') AS c
2021-08-15 07:53:46 +00:00
0.6
2021-05-06 18:21:10 +00:00
SELECT CAST((CAST(\'0.1\', \'Decimal(4, 4)\') + CAST(\'0.2\', \'Decimal(4, 4)\')) + CAST(\'0.3\', \'Decimal(4, 4)\'), \'Decimal(4, 4)\') AS c
[1]
[[1,2,3],[],[1]]
[[],[]]