mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Fix erros and add test
This commit is contained in:
parent
70fac9c068
commit
2974d81b2e
@ -71,7 +71,7 @@ namespace ErrorCodes
|
|||||||
extern const int BAD_DATABASE_FOR_TEMPORARY_TABLE;
|
extern const int BAD_DATABASE_FOR_TEMPORARY_TABLE;
|
||||||
extern const int SUSPICIOUS_TYPE_FOR_LOW_CARDINALITY;
|
extern const int SUSPICIOUS_TYPE_FOR_LOW_CARDINALITY;
|
||||||
extern const int DICTIONARY_ALREADY_EXISTS;
|
extern const int DICTIONARY_ALREADY_EXISTS;
|
||||||
extern const int ILLEGAL_SYNTAX_FOR_DATA_TYPE
|
extern const int ILLEGAL_SYNTAX_FOR_DATA_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
Nullable(Int32) Int32 Nullable(Int32) Int32
|
||||||
|
Nullable(Int32) Int32 Nullable(Int32) Nullable(Int32)
|
@ -1,11 +1,42 @@
|
|||||||
DROP TABLE IF EXISTS data_null;
|
DROP TABLE IF EXISTS data_null;
|
||||||
|
DROP TABLE IF EXISTS set_null;
|
||||||
|
|
||||||
CREATE TABLE data_null (
|
CREATE TABLE data_null (
|
||||||
a INT NULL,
|
a INT NULL,
|
||||||
b INT NOT NULL,
|
b INT NOT NULL,
|
||||||
C Nullable(INT)
|
c Nullable(INT),
|
||||||
);
|
d INT
|
||||||
|
) engine=Memory();
|
||||||
|
|
||||||
INSERT INTO data_null VALUES (1, 2, 3);
|
|
||||||
|
|
||||||
SELECT toTypeName(*) FROM data_null;
|
INSERT INTO data_null VALUES (1, 2, 3, 4);
|
||||||
|
|
||||||
|
SELECT toTypeName(a), toTypeName(b), toTypeName(c), toTypeName(d) FROM data_null;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE data_null (
|
||||||
|
a Nullable(INT) NULL,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c Nullable(INT)
|
||||||
|
) engine=Memory(); --{serverError 377}
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE data_null (
|
||||||
|
a INT NULL,
|
||||||
|
b Nullable(INT) NOT NULL,
|
||||||
|
c Nullable(INT)
|
||||||
|
) engine=Memory(); --{serverError 377}
|
||||||
|
|
||||||
|
SET data_type_default_nullable='true';
|
||||||
|
|
||||||
|
CREATE TABLE set_null (
|
||||||
|
a INT NULL,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c Nullable(INT),
|
||||||
|
d INT
|
||||||
|
) engine=Memory();
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO set_null VALUES (1, 2, 3, 4);
|
||||||
|
|
||||||
|
SELECT toTypeName(a), toTypeName(b), toTypeName(c), toTypeName(d) FROM set_null;
|
||||||
|
Loading…
Reference in New Issue
Block a user