提交 69d7432f 编写于 作者: A Alexey Milovidov

Added test for ALTERing Nullable columns [#CLICKHOUSE-4].

上级 f32862be
Hello
World
Hello
World
\N
Hello
World
xyz
\N
Hello
World
xyz\0\0
DROP TABLE IF EXISTS test.nullable_alter;
CREATE TABLE test.nullable_alter (d Date DEFAULT '2000-01-01', x String) ENGINE = MergeTree(d, d, 1);
INSERT INTO test.nullable_alter (x) VALUES ('Hello'), ('World');
SELECT x FROM test.nullable_alter ORDER BY x;
ALTER TABLE test.nullable_alter MODIFY COLUMN x Nullable(String);
SELECT x FROM test.nullable_alter ORDER BY x;
INSERT INTO test.nullable_alter (x) VALUES ('xyz'), (NULL);
SELECT x FROM test.nullable_alter ORDER BY x NULLS FIRST;
ALTER TABLE test.nullable_alter MODIFY COLUMN x Nullable(FixedString(5));
SELECT x FROM test.nullable_alter ORDER BY x NULLS FIRST;
DROP TABLE test.nullable_alter;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册