1

Hi anyone instruct me which version of cassandra should I use to run cqlsh-3.4.3, So that i will be able to run GROUP BY queries.

Currently My environment is

[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]

Error on trying bin/cqlsh --cqlversion=3.4.3

Connection error: ('Unable to connect to any servers', {'127.0.0.1': ProtocolError("cql_version '3.4.3' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.2']",)})

Please Suggest.Thanks.

Same Error while tried with cassandra 3.7 Also.

1 Answers1

6

You can try to force cqlsh to use a specific cql version using the option

--cqlversion="#.#.#"

example: cqlsh 127.0.0.1 9042 --cqlversion="3.2.0" (in your case: 3.4.2)

example of mine:

me@XXX:~$ cqlsh <cassandra_ip>
Connection error: ('Unable to connect to any servers', {<cassandra_ip>: ProtocolError("cql_version '3.4.2' is not supported by remote (w/ native protocol). Supported versions: [u'3.3.1']",)})
me@XXX:~$ cqlsh <cassandra_ip> --cqlversion="3.3.1"
Connected to UAT Analytics Cluster at <cassandra_ip>:9042.
[cqlsh 5.0.1 | Cassandra 2.2.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> 

UPDATE

(1) group by will be supported in CQL 3.4.3 and Cassandra 3.10.

(2) It is not recommended to upgrade CQL spec for Cassandra of specific version. OR it is impossible to upgrade CQL spec version for one Cassandra version (here).

(3) In order to use group by, you should upgrade cassandra to 3.10, OR user defined functions, OR change your table design...

Community
  • 1
  • 1
BAE
  • 8,550
  • 22
  • 88
  • 171
  • I am able to run --cqlversion="3.4.2", BUt this does not suffice my need of "RUNNING GROUP BY queries". As per documentation on (Cassandra WebSite), Groupby query is supported from --cqlversion="3.4.3". Mark it's 3.4.3... But do u know any cassandra version which supports it. I tried with latest stable version I:e: 3.9 and when tried bin/cqlsh localhostIP --cqlversion=3.4.3 , I faced some error. SO i asked the question. –  Dec 14 '16 at 16:32
  • You modified your question? – BAE Dec 14 '16 at 18:47
  • https://issues.apache.org/jira/browse/CASSANDRA-10707, I guess `group by` will be supported in Cassandra 3.10. I will double check. – BAE Dec 14 '16 at 18:54
  • 1
    @LoneRanger I guess `group by` will be supported in Cassandra 3.10 and cql 3.4.3 (as for your comments). So, the point is that your current cassandra database cannot support `group by`. I will double check. – BAE Dec 14 '16 at 19:06
  • @LoneRange Sorry for that, I am trying to give more accurate details. But there are several issues: 1, your cassandra server supports 3.4.2, so you cannot use `--cqlversion=3.4.3`; 2, I am not sure whether cassandra 3.9 supports cql version 3.4.3, and how to upgrade it to use 3.4.3; i am trying to help. – BAE Dec 14 '16 at 19:17
  • Ok.Thanks for your support. Do you have any other storage-system in your mind/experience like cassandra where i can run some aggregation query faster. Not (Spark, or hadoop-Hive-MongoDb, For some reason i am not using these options)?? Because for 3.10 to release, it seems we need to wait for another couple of weeks or Month. –  Dec 14 '16 at 19:25
  • @LoneRanger May this post http://stackoverflow.com/questions/17342176/max-distinct-and-group-by-in-cassandra help. – BAE Dec 14 '16 at 19:26