Class GroupingSetsList


  • final class GroupingSetsList
    extends Object
    Class for using GROUP BY GROUPING SETS sql query.

    For example, suppose we have the 3 grouping sets (a, b, c), (a, b) and (b, c).

    • detailed grouping set -> (a, b, c)
    • rolled-up grouping sets -> (a, b), (b, c)
    • rollup columns -> c, a (c for (a, b) and a for (b, c))
    • rollup columns bitkey ->
      (a, b, c) grouping set represented as 0, 0, 0
      (a, b) grouping set represented as 0, 0, 1
      (b, c) grouping set represented as 1, 0, 0
    Since:
    24 May 2007
    Author:
    Thiyagu
    • Constructor Detail

      • GroupingSetsList

        public GroupingSetsList​(List<GroupingSet> groupingSets)
        Creates a GroupingSetsList.

        First element of the groupingSets list should be the detailed grouping set (default grouping set), followed by grouping sets which can be rolled-up.

        Parameters:
        groupingSets - List of groups of columns
    • Method Detail

      • getGroupingBitKeyIndex

        public int getGroupingBitKeyIndex()
      • getRollupColumnsBitKeyList

        public List<BitKey> getRollupColumnsBitKeyList()
      • useGroupingSets

        public boolean useGroupingSets()
      • findGroupingFunctionIndex

        public int findGroupingFunctionIndex​(int columnIndex)
      • getDefaultAxes

        public SegmentAxis[] getDefaultAxes()
      • getDefaultGroupingSet

        protected GroupingSet getDefaultGroupingSet()
      • getDefaultSegments

        public List<Segment> getDefaultSegments()
      • getDefaultLevelBitKey

        public BitKey getDefaultLevelBitKey()
      • getDefaultMeasureBitKey

        public BitKey getDefaultMeasureBitKey()