Class GroupingState

java.lang.Object
org.apache.cassandra.db.aggregation.GroupingState

public final class GroupingState extends Object
GroupMaker state.

The state contains the primary key of the last row that has been processed by the previous GroupMaker used. It can be passed to a GroupMaker to allow to resuming the grouping.

GroupingState is only used for internal paging. When a new page is requested by a client the initial state will always be empty.

If the state has a partition key but no clustering, it means that the previous group ended at the end of the previous partition. If the clustering is not null it means that we are in the middle of a group.

  • Field Details

  • Constructor Details

  • Method Details

    • partitionKey

      public ByteBuffer partitionKey()
      Returns the last row partition key or null if no rows has been processed yet.
      Returns:
      the last row partition key or null if no rows has been processed yet
    • clustering

      public Clustering<?> clustering()
      Returns the last row clustering or null if either no rows has been processed yet or the last row was a static row.
      Returns:
      he last row clustering or null if either no rows has been processed yet or the last row was a static row
    • hasClustering

      public boolean hasClustering()
      Checks if the state contains a Clustering for the last row that has been processed.
      Returns:
      true if the state contains a Clustering for the last row that has been processed, false otherwise.