Ivan Artiukhov created IGNITE-20073:
---------------------------------------

             Summary: [SQL] Inconsistent error message upon inserting a NULL 
value into a NOT NULL column
                 Key: IGNITE-20073
                 URL: https://issues.apache.org/jira/browse/IGNITE-20073
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 3.0
            Reporter: Ivan Artiukhov


Create a table with a {{NOT NULL}} column:
{noformat}
CREATE TABLE CAR(ID INT, PARKINGID INT NOT NULL, NAME VARCHAR(255), CITY 
VARCHAR(20), PRIMARY KEY (ID, PARKINGID))
{noformat}
Insert a NULL value into that column:
{noformat}
INSERT INTO PUBLIC.CAR(ID, PARKINGID, NAME) VALUES(1002, NULL, 'car_1002')
{noformat}
*Expected result:*
An exception is thrown

*Actual result:*
En exception is thrown but its message differs from time to time.

Sometimes the exception looks like this:
{noformat}
'HY000', "[HY000] org.apache.ignite.lang.IgniteException: From line 1, column 
45 to line 1, column 74: Column 'PARKINGID' has no default value and does not 
allow NULLs (131071, c361f5a2-e219-476d-a817-15809bf5b588) (0) (SQLExecDirectW)"
{noformat}
Sometimes like this:
{noformat}
'HY000', "[HY000] org.apache.ignite.lang.IgniteException: From line 1, column 
45 to line 1, column 74: Column 'PARKINGID' does not allow NULLs (131071, 
ca73fb01-0b69-4c8d-9a36-1adcb3d679b7) (0) (SQLExecDirectW)"
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to