Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4216

CQL 3 "select count(*)" doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • None
    • OSX 10.6.8

    • Low

    Description

      "select count(1)" works fine; "select count" fails with "Bad Request: Only COUNT and COUNT(1) operations are currently supported."

      Tested from cqlsh 2.2.0 and current C++ Thrift interface.

      CQL 3
      [cqlsh 2.2.0 | Cassandra 1.1.0 | CQL spec 3.0.0 | Thrift protocol 19.30.0]
      Use HELP for help.
      cqlsh> use warehouse1;
      cqlsh:warehouse1> select count(1) from trans;
       count
      -------
         504
      
      cqlsh:warehouse1> select count(*) from trans;
      Bad Request: Only COUNT(*) and COUNT(1) operations are currently supported.
      

      CQL 2 works fine:

      CQL 2
      [cqlsh 2.2.0 | Cassandra 1.1.0 | CQL spec 2.0.0 | Thrift protocol 19.30.0]
      Use HELP for help.
      cqlsh> use warehouse1;
      cqlsh:warehouse1> select count(*) from trans;
       count
      -------
        1562
      
      cqlsh:warehouse1> select count(1) from trans;
       count
      -------
        1567
      

      No errors logged by the server.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbillig Sean Billig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: