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

Using SELECT COUNT(*) FROM... LIMIT 1 in the returning section results in ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • NA
    • Accord
    • None

    Description

      cqlsh> 
      BEGIN TRANSACTION 
        LET row1 = (SELECT * FROM ks.tbl1 WHERE k = 5); 
        SELECT COUNT(*) FROM ks.tbl1 LIMIT 1; 
        IF row1 IS NULL THEN 
          INSERT INTO ks.tbl1 (k, v) VALUES (5, 10);
        END IF
      COMMIT TRANSACTION;
      
      NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: 127.0.0.1:9042 datacenter1>: <Error from server: code=0000 [Server error] message="java.lang.ClassCastException: org.apache.cassandra.db.PartitionRangeReadCommand cannot be cast to org.apache.cassandra.db.SinglePartitionReadQuery$Group">})
      

      Attachments

        Activity

          People

            jlewandowski Jacek Lewandowski
            jlewandowski Jacek Lewandowski
            Jacek Lewandowski
            Caleb Rackliffe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: