Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.9.1
-
None
-
None
-
Docs Required, Release Notes Required
Description
The documentation claims I can use the DEFAULT keyword to explicitly insert default values in INSERT statements:
https://ignite.apache.org/docs/latest/sql-reference/dml#insert
INSERT INTO tableName {[( columnName [,...])] {VALUES {({DEFAULT | expression} [,...])} [,...] | [DIRECT] [SORTED] select}} | {SET {columnName = {DEFAULT | expression}} [,...]}
When I try this, it doesn't seem to work
CREATE TABLE t (i int PRIMARY KEY, j int DEFAULT 1); INSERT INTO t VALUES (1); -- works INSERT INTO t (i, j) VALUES (2, DEFAULT); -- doesn't work
I'm getting:
SQL Error [1002] [0A000]: Explicit DEFAULT values are unsupported for INSERT.
With the alternative MySQL style syntax that the documentation suggests to work:
INSERT INTO t SET i = 2, j = DEFAULT;
I'm getting this error, instead:
SQL Error [1001] [42000]: Failed to parse query. Column "DEFAULT" not found; SQL statement:
SELECT
TABLE.I,
TABLE.J
FROM TABLE(I INTEGER=(2,), J INTEGER=(DEFAULT,)) [42122-197]
Either the documentation or the implementation is wrong.