ClickHouse/tests/queries/0_stateless/01821_table_comment.sql

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

83 lines
1.4 KiB
MySQL
Raw Normal View History

-- Tags: no-parallel, no-fasttest
2021-09-12 12:35:27 +00:00
2021-04-23 12:18:23 +00:00
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
CREATE TABLE t1
(
`n` Int8
)
ENGINE = Memory
2024-07-22 17:08:04 +00:00
COMMENT 'this is a temporary table';
2021-04-23 12:18:23 +00:00
CREATE TABLE t2
(
`n` Int8
)
ENGINE = MergeTree
ORDER BY n
COMMENT 'this is a MergeTree table';
CREATE TABLE t3
(
`n` Int8
)
ENGINE = Log
COMMENT 'this is a Log table';
2024-07-22 17:08:04 +00:00
CREATE TABLE t4
(
`n` Int8
)
ENGINE = Kafka
SETTINGS
kafka_broker_list = 'localhost:10000',
kafka_topic_list = 'test',
kafka_group_name = 'test',
kafka_format = 'JSONEachRow'
COMMENT 'this is a Kafka table';
CREATE TABLE t5
(
`n` Int8
)
ENGINE = EmbeddedRocksDB
PRIMARY KEY n
COMMENT 'this is a EmbeddedRocksDB table';
CREATE TABLE t6
(
`n` Int8
)
ENGINE = Executable('script.py', TabSeparated)
COMMENT 'this is a Executable table';
SET allow_experimental_window_view = 1;
-- New analyzer doesn't support WindowView tables
SET allow_experimental_analyzer = 0;
CREATE WINDOW VIEW t7
(
`n` Int8
)
ENGINE MergeTree
ORDER BY n
AS SELECT 1
GROUP BY tumble(now(), toIntervalDay('1'))
COMMENT 'this is a WindowView table';
SET allow_experimental_analyzer = 1;
2021-04-23 12:18:23 +00:00
SELECT
name,
comment
FROM system.tables
2024-07-22 17:08:04 +00:00
WHERE name IN ('t1', 't2', 't3', 't4', 't5', 't6', 't7')
AND database = currentDatabase() order by name;
2021-04-23 12:18:23 +00:00
2021-05-03 16:19:48 +00:00
SHOW CREATE TABLE t1;
2024-07-22 17:08:04 +00:00
DROP TABLE t1, t2, t3, t4, t5, t6;
DROP VIEW t7;