ClickHouse/tests/queries/0_stateless/01852_cast_operator_4.sql
Nikolay Degterinsky 5d4591adaa Better test
2022-02-07 15:02:19 +00:00

21 lines
787 B
SQL

SELECT [3,4,5][1]::Int32;
EXPLAIN SYNTAX SELECT [3,4,5][1]::Int32;
SELECT [3,4,5]::Array(Int64)[2]::Int8;
EXPLAIN SYNTAX SELECT [3,4,5]::Array(Int64)[2]::Int8;
SELECT [1,2,3]::Array(UInt64)[[number, number]::Array(UInt8)[number]::UInt64]::UInt8 from numbers(3);
EXPLAIN SYNTAX SELECT [1,2,3]::Array(UInt64)[[number, number]::Array(UInt8)[number]::UInt64]::UInt8 from numbers(3);
WITH [3,4,5] AS x SELECT x[1]::Int32;
EXPLAIN SYNTAX WITH [3,4,5] AS x SELECT x[1]::Int32;
SELECT tuple(3,4,5).1::Int32;
EXPLAIN SYNTAX SELECT tuple(3,4,5).1::Int32;
SELECT tuple(3,4,5)::Tuple(UInt64, UInt64, UInt64).2::Int32;
EXPLAIN SYNTAX SELECT tuple(3,4,5)::Tuple(UInt64, UInt64, UInt64).1::Int32;
WITH tuple(3,4,5) AS x SELECT x.1::Int32;
EXPLAIN SYNTAX WITH tuple(3,4,5) AS x SELECT x.1::Int32;