0

I am trying to create a table using cqlsh with composite primary key but it doesn't return to the cqlsh prompt. The cqlsh and cassandra versions are cqlsh 3.1.7 | Cassandra 1.2.13.2. Can we not create composite primary key using cqlsh? Have tried Dbeaver but that also fails reporting mismatched input ',' expecting EOF. Are there any other clients that allow to create?

Any suggestions would be helpful.

schatter
  • 151
  • 1
  • 11
  • Can you post the exact code you are using? sounds like some syntax problem. – Bereng Nov 18 '14 at 12:34
  • This is similar to the problem reported here: https://issues.apache.org/jira/browse/CASSANDRA-6472 – schatter Nov 18 '14 at 13:28
  • Tested this out with the following command which hanged: CREATE TABLE "TestTable1" ("Tc1" text, "Tc2" timestamp, "Tc3" text, PRIMARY KEY (("Tc1", "Tc2"), "Tc3")); – schatter Nov 18 '14 at 13:31
  • Not sure what's going on there, as composite partition keys were indeed implemented by 1.2. I can tell you that it works fine in 2.1, so there must be some other bug at work here. – Aaron Nov 18 '14 at 14:15
  • It is working on the other nodes of the same cluster but not on this. And this node is shown up and running as per nodetool. – schatter Nov 19 '14 at 09:20

1 Answers1

0

I tried your CREATE TABLE command on the same version of Cassandra using cql 3 and it just worked. It failed using cql 2.

If you're still using cql 2, that's likely the source of your problem.

mildewey
  • 414
  • 2
  • 5
  • It does work on other nodes in the same cluster but not working on one of the nodes. I am using cql 3. – schatter Nov 20 '14 at 10:17
  • In that case, there may be something wrong with that specific node or with your cluster connectivity (some kind of schema disagreement). – mildewey Nov 20 '14 at 20:01