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

order by descending on frozen list not working

    XMLWordPrintableJSON

Details

    Description

      By creating a table like the following:

      CREATE TABLE IF NOT EXISTS software (
       name ascii,
       version frozen<list<int>>,
       data ascii,
       PRIMARY KEY(name,version)
      )
      

      It works and version is ordered in an ascending order. But when trying to order in descending order:

      CREATE TABLE IF NOT EXISTS software (
          name ascii,
          version frozen<list<int>>,
          data ascii,
          PRIMARY KEY(name,version)
      ) WITH CLUSTERING ORDER BY (version DESC);
      

      The table is created normally, but when trying to insert a row:

      insert into software(name, version) values ('t1', [2,10,30,40,50]); 
      

      Cassandra throws an error:

      InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid list literal for version of type frozen<list<int>>"
      

      The goal here is that I would like to get the last version of a software.

       

      Attachments

        Issue Links

          Activity

            People

              adelapena Andres de la Peña
              felipevp Felipe Perez
              Andres de la Peña
              Andres de la Peña, Berenguer Blasi
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m