我通过将两列定义为主键 (PK) 创建了一个 Ignite 表。当我尝试插入数据时,它因重复键错误而失败。PK 在 type 和 id 列上定义。
0: jdbc:ignite:thin://node1.example.com> insert into balance (type,amount,currency,asof,id) values ('Current Balance',20000.1,'INR','2020-04-07 00:00:00.000','1009230183926');
1 row affected (0.036 seconds)
0: jdbc:ignite:thin://node1.example.com> insert into balance (type,amount,currency,asof,id) values ('Current Balance',30000,'INR','2020-04-07 00:00:00.000','1009230183926');
Error: Duplicate key during INSERT [key=SQL_PUBLIC_BALANCE_4791140f_63cb_4663_8c02_58f14073ff0c_KEY [idHash=1321771843, hash=-1614321497, TYPE=Current Balance, ID=1009230183926]] (state=23000,code=4001)
java.sql.SQLException: Duplicate key during INSERT [key=SQL_PUBLIC_BALANCE_4791140f_63cb_4663_8c02_58f14073ff0c_KEY [idHash=1321771843, hash=-1614321497, TYPE=Current Balance, ID=1009230183926]]
Ignite 是否像任何其他 RDBMS 一样支持复合键?我该如何解决这个问题。