While testing Cassandra 1.2.1, 1.2.3 and 1.2.4 servers for issue 10020, I noticed that values assigned to timeuuid and uuid data types cannot be quoted on 1.2.3 and 1.2.4 servers. For examples, all of following statements work on 1.2.1 server:
// --- timeuuid/uuid values are quoted ---
INSERT INTO "Test_KS_3"."tmp_tbl_data_timeuuid"("c_key", "c_timeuuid")
VALUES(1, '6ba7b810-9dad-11d1-80b4-00c04fd430c8')
GO
INSERT INTO "Test_KS_3"."tmp_tbl_data_uuid"("c_key", "c_uuid")
VALUES(4, '177f42e6-6f22-44d9-93f6-8c475170daf6')
GO
// --- timeuuid/uuid values are NOT quoted ---
INSERT INTO "Test_KS_3"."tmp_tbl_data_timeuuid"("c_key", "c_timeuuid")
VALUES(1, 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
GO
INSERT INTO "Test_KS_3"."tmp_tbl_data_uuid"("c_key", "c_uuid")
VALUES(4, 177f42e6-6f22-44d9-93f6-8c475170daf6)
GO
On 1.2.3 and 1.2.4 servers, the first two statements above won't work.
In the current implementation, timeuuid/uuid values are quoted in the generated script which won't work on 1.2.3/1.2.4 servers. We need to review ADS components where script can be generated and make changes accordingly, e.g. Schema Script Generator, Script Object to As ..., etc.
We're upgrading our the server running Cassandra 1.2.3 to 1.2.8. Tariq - pls test against this one.
Fixed:
14.0 - SVN r34147/14.0.0-rc-30
trunk - SVN r34148/15.0.0-dev-16
I needed to add a new type, UUID, to AFTableColumnInfo in order to resolve this issue.
I reviewed script generation related code for the following tools and tested uuid/timeuuid types against them:
(1) Table Data Editor: INSERT/DELETE/UPDATE statements
(2) Schema Script Generator: INSERT statements
(3) Export Dialog: output to file in CSV format
(4) Import Dialog: import from file generated by Export Dialog; INSERT statements
(5) /sqldump, /sqlexport, /sqlimport commands.
I also made changes to the stubs generated by 'Script Object to ... As ...', the generated scripts now will be similar to the ones shown below:
INSERT INTO "issue_ks"."issue_10161"("c_key", "c_1", "c_2", "c_uuid")
VALUES(UUID, 0, '', UUID)
GO
UPDATE "issue_ks"."issue_10161_timeuuid"
SET "c_key"=UUID, "c_1"=0, "c_2"='', "c_timeuuid"=UUID
WHERE
GO
If we want to replace 'UUID' words shown above with a real UUID value, please log an issue and I will look into it.
Fixed:
14.0 - SVN r34147/14.0.0-rc-30
trunk - SVN r34148/15.0.0-dev-16
I needed to add a new type, UUID, to AFTableColumnInfo in order to resolve this issue.
I reviewed script generation related code for the following tools and tested uuid/timeuuid types against them:
(1) Table Data Editor: INSERT/DELETE/UPDATE statements
(2) Schema Script Generator: INSERT statements
(3) Export Dialog: output to file in CSV format
(4) Import Dialog: import from file generated by Export Dialog; INSERT statements
(5) /sqldump, /sqlexport, /sqlimport commands.
I also made changes to the stubs generated by 'Script Object to ... As ...', the generated scripts now will be similar to the ones shown below:
INSERT INTO "issue_ks"."issue_10161"("c_key", "c_1", "c_2", "c_uuid")
VALUES(UUID, 0, '', UUID)
GO
UPDATE "issue_ks"."issue_10161_timeuuid"
SET "c_key"=UUID, "c_1"=0, "c_2"='', "c_timeuuid"=UUID
WHERE
GO
If we want to replace 'UUID' words shown above with a real UUID value, please log an issue and I will look into it.
Issue #10161 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.0-rc-30/15.0.0-dev-16 |
No time estimate |
2 issue links |
relates to #10346
Issue #10346Cassandra - Table data editor - values of NUMBER/BLOB/BOOLEAN/UUID data types are quoted in collections |
relates to #10283
Issue #10283Replace 'UUID' with a real UUID value in Cassandra |
We're upgrading our the server running Cassandra 1.2.3 to 1.2.8. Tariq - pls test against this one.