Thanks for your response. Wanted to understand that then how in the second run it is throwing error?
On Mon, Apr 5, 2021, 4:27 PM Ilya Kasnacheev <ilya.kasnach...@gmail.com> wrote: > Hello! > > I guess that "not null" is only tracked by SQL code, but not by cache API > or data streamer. > > Regards, > -- > Ilya Kasnacheev > > > сб, 3 апр. 2021 г. в 18:22, sourav dihidar <sdihi...@gmail.com>: > >> Hi Team, >> I am facing one issue >> I created one table as below >> CREATE TABLE STUDENT >> ( >> ID INTEGER NOT NULL, >> NAME VARCHAR(200) NOT NULL, >> SALARY INTGER NOT NULL, >> PRIMARY KEY(STUDENTID) >> )WITH "KEY_TYPE=Tab_Key,VALUE_TYPE=TAB_VALUE"; >> >> >> >> I used datastreamer to load the data into the table >> try(IgniteDataStreamer<BinaryObject,BinaryObject> >> stmr=ignite.dataStreamer("SQL_PUBLIC_STUDENT")){ >> stmr.keepBinary(true); >> stmr.allowOverwrite(true); >> BinaryObjectBuilder keyBuilder=ignite.binary().builder("Tab_Key"); >> BinaryObjectBuilder keyBuilder=ignite.binary().builder("Tab_Value"); >> keyBuilder.setField("ID",new Integer(100)); >> valueBuilder.setField(" NAME","Petit");// did not insert any value for >> SALARY in the value builder >> stmr.addData( keyBuilder.build(), valueBuilder.build()); >> } >> >> When I am running this for the first time , data gets inserted with >> id=100,name=Petit,salary=null though the SALARY is not null field. >> In the second run it gives NULL value is not allowed for column SALARY >> Why it is not giving this error in the first run itself. >> >> Thanks >> >