Test fixes

This commit is contained in:
Igor Nikonov 2022-05-13 13:33:45 +00:00
parent 8d5cabc8f7
commit 74be0946ff
2 changed files with 5 additions and 13 deletions

View File

@ -581,7 +581,7 @@ ColumnsDescription InterpreterCreateQuery::getColumnsDescription(
else if (col_decl.type)
column.type = name_type_it->type;
else
throw Exception{"Neither default experssion nor type is provided for a column", ErrorCodes::LOGICAL_ERROR};
throw Exception{"Neither default value expression nor type is provided for a column", ErrorCodes::LOGICAL_ERROR};
if (col_decl.comment)
column.comment = col_decl.comment->as<ASTLiteral &>().value.get<String>();

View File

@ -39,26 +39,18 @@ DESCRIBE TABLE ignore_auto_increment;
select 'create table failed, column +type +DEFAULT +AUTO_INCREMENT';
DROP TABLE IF EXISTS ignore_auto_increment SYNC;
CREATE TABLE ignore_auto_increment (
id int DEFAULT 1 AUTO_INCREMENT
) ENGINE=MergeTree() ORDER BY tuple(); -- {serverError SYNTAX_ERROR}
CREATE TABLE ignore_auto_increment (id int DEFAULT 1 AUTO_INCREMENT) ENGINE=MergeTree() ORDER BY tuple(); -- {clientError SYNTAX_ERROR}
select 'create table failed, column -type +DEFAULT +AUTO_INCREMENT';
DROP TABLE IF EXISTS ignore_auto_increment SYNC;
CREATE TABLE ignore_auto_increment (
id int DEFAULT 1 AUTO_INCREMENT
) ENGINE=MergeTree() ORDER BY tuple(); -- {serverError SYNTAX_ERROR}
CREATE TABLE ignore_auto_increment (id int DEFAULT 1 AUTO_INCREMENT) ENGINE=MergeTree() ORDER BY tuple(); -- {clientError SYNTAX_ERROR}
select 'create table failed, column +type +AUTO_INCREMENT +DEFAULT';
DROP TABLE IF EXISTS ignore_auto_increment SYNC;
CREATE TABLE ignore_auto_increment (
id int AUTO_INCREMENT DEFAULT 1
) ENGINE=MergeTree() ORDER BY tuple(); -- {serverError SYNTAX_ERROR}
CREATE TABLE ignore_auto_increment (id int AUTO_INCREMENT DEFAULT 1) ENGINE=MergeTree() ORDER BY tuple(); -- {clientError SYNTAX_ERROR}
select 'create table failed, column -type +AUTO_INCREMENT +DEFAULT';
DROP TABLE IF EXISTS ignore_auto_increment SYNC;
CREATE TABLE ignore_auto_increment (
id int AUTO_INCREMENT DEFAULT 1
) ENGINE=MergeTree() ORDER BY tuple(); -- {serverError SYNTAX_ERROR}
CREATE TABLE ignore_auto_increment (id int AUTO_INCREMENT DEFAULT 1) ENGINE=MergeTree() ORDER BY tuple(); -- {clientError SYNTAX_ERROR}
DROP TABLE IF EXISTS ignore_auto_increment SYNC;