Skip to content

Commit 740f4b6

Browse files
add test for the issue
1 parent 194e56b commit 740f4b6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/queries/0_stateless/03512_cast_logical_error.reference

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- Tags: distributed
2+
3+
-- https://github.com/ClickHouse/ClickHouse/issues/77468
4+
5+
DROP TABLE IF EXISTS t0;
6+
DROP TABLE IF EXISTS t1;
7+
DROP TABLE IF EXISTS v0;
8+
9+
CREATE TABLE t0 (c0 Array(String)) ENGINE = Memory;
10+
CREATE TABLE t1 (c0 Array(String)) ENGINE = Distributed('test_shard_localhost', default, t0);
11+
CREATE MATERIALIZED VIEW v0 TO t1 (c0 String) AS (SELECT 1::Array(Int) AS c0); -- { serverError CANNOT_READ_ARRAY_FROM_TEXT }
12+
13+
DROP TABLE IF EXISTS t0;
14+
DROP TABLE IF EXISTS t1;
15+
DROP TABLE IF EXISTS v0;
16+
17+
CREATE TABLE t0 (c1 Int) ENGINE = MergeTree() ORDER BY tuple();
18+
CREATE TABLE t1 (c1 Date) ENGINE = Distributed('test_shard_localhost', default, t0);
19+
CREATE MATERIALIZED VIEW v0 TO t1 (c1 String) AS (SELECT '2010-10-10' AS c1);
20+
SELECT CAST(c1 AS Enum('1' = 1)) FROM v0;
21+
22+
DROP TABLE IF EXISTS t0;
23+
DROP TABLE IF EXISTS t1;
24+
DROP TABLE IF EXISTS v0;

0 commit comments

Comments
 (0)