You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Iurii Gerzhedovich (Jira)" <ji...@apache.org> on 2024/04/30 13:26:00 UTC

[jira] [Commented] (IGNITE-20073) [SQL] Inconsistent error message upon inserting a NULL value into a NOT NULL column

    [ https://issues.apache.org/jira/browse/IGNITE-20073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842383#comment-17842383 ] 

Iurii Gerzhedovich commented on IGNITE-20073:
---------------------------------------------

Seems fixed under IGNITE-22015

> [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
>            Priority: Major
>              Labels: ignite-3
>
> 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)