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

Unfiltered.isEmpty conflicts with Row extends AbstractCollection.isEmpty

    XMLWordPrintableJSON

Details

    • Low

    Description

      The isEmpty() method’s definition for a Row is incompatible with that for a Collection.  The former can return false even if there is no ColumnData for the row (i.e. the collection is of size 0).
       
      This currently, by chance, doesn’t cause us any problems.  But if we ever pass a Row as a Collection to a method that invokes isEmpty() and then expects (for correctness) that the collection portion is not empty, it will fail.
       
      We should probably have an asCollection() method to obtain a collection from a Row, and not implement Collection directly.

      Attachments

        Activity

          People

            benedict Benedict Elliott Smith
            benedict Benedict Elliott Smith
            Benedict Elliott Smith
            Blake Eggleston
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: