-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Inconsistencies of inserts with default values #7943
Copy link
Copy link
Closed
Labels
comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).not plannedKnown issue, no plans to fix it currenltyKnown issue, no plans to fix it currenlty
Description
:) create table t (a Int DEFAULT 42, b Int DEFAULT 43) engine = MergeTree order by tuple() partition by tuple();
:) insert into t values ()
INSERT INTO t VALUES
Exception on client:
Code: 62. DB::Exception: Cannot parse expression of type Int32 here: )
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 19.18.1 revision 54429.
:) drop table t
:) create table t (a Int DEFAULT 42) engine = MergeTree order by tuple() partition by tuple();
:) insert into t values ()
INSERT INTO t VALUES
Ok.
1 rows in set. Elapsed: 0.002 sec.
:) select * from t
SELECT *
FROM t
┌─a─┐
│ 0 │
└───┘
1 rows in set. Elapsed: 0.003 sec.
I would like to add that documentation for INSERT needs to be actualized after f3b6d35: https://github.com/ClickHouse/ClickHouse/search?q=strict_insert_defaults&type=Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).not plannedKnown issue, no plans to fix it currenltyKnown issue, no plans to fix it currenlty