ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From radha jai <jairadhah...@gmail.com>
Subject Unable to insert data into table after altering the table
Date Fri, 02 Aug 2019 08:55:26 GMT
Hi,
 Insertion is failing, after altering the table.
 Followed below steps:

-> CREATE TABLE student (id_ VARCHAR, firstName VARCHAR, lastName VARCHAR,
birthDate TIMESTAMP, height DOUBLE, PRIMARY KEY(id))
-> INSERT INTO student (id, firstName, lastName, birthDate, height) VALUES
(1000, 'huxt', 'abx', CURRENT_TIMESTAMP(), 5.6);
-> ALTER TABLE student DROP COLUMN birthDate;
-> ALTER TABLE student ADD COLUMN birthDate VARCHAR;
-> INSERT INTO student (id, firstName, lastName, birthDate, height) VALUES
(1001, 'luan', 'qwst', '11223', 6.6);

Getting below error:
Error: class org.apache.ignite.binary.BinaryObjectException: Wrong value
has been set
[typeName=SQL_PUBLIC_STUDENT_e910ba3a_3a65_4d53_9265_8c12a9b0bac3,
fieldName=BIRTHDATE, fieldType=Timestamp, assignedValueType=String]
(state=50000,code=1)

Issues faced:
-> unable to insert the data after modifying the datatype of the field in a
table.
-> If i do " select * from student;" , I am seeing the old data being
inserted for the birthdate column, after dropping birthdate colmun and
adding the colmn with the same name but different datatype.

Is this a know issue? Or soemthing i am doing wrong.
If it is a know issue please provide the workaround.

Thanks
radha

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message