Class GroupByList

    • Field Detail

      • numGroupingColsAdded

        int numGroupingColsAdded
      • rollup

        boolean rollup
    • Method Detail

      • addGroupByColumn

        void addGroupByColumn​(GroupByColumn column)
        Add a column to the list
        Parameters:
        column - The column to add to the list
      • getGroupByColumn

        GroupByColumn getGroupByColumn​(int position)
        Get a column from the list
        Parameters:
        position - The column to get from the list
      • setRollup

        void setRollup()
      • isRollup

        boolean isRollup()
      • getNumNeedToAddGroupingCols

        int getNumNeedToAddGroupingCols()
        Get the number of grouping columns that need to be added to the SELECT list.
        Returns:
        int The number of grouping columns that need to be added to the SELECT list.
      • bindGroupByColumns

        void bindGroupByColumns​(SelectNode select,
                                java.util.List<AggregateNode> aggregates)
                         throws StandardException
        Bind the group by list. Verify: o Number of grouping columns matches number of non-aggregates in SELECT's RCL. o Names in the group by list are unique o Names of grouping columns match names of non-aggregate expressions in SELECT's RCL.
        Parameters:
        select - The SelectNode
        aggregates - The aggregate list being built as we find AggregateNodes
        Throws:
        StandardException - Thrown on error
      • findGroupingColumn

        GroupByColumn findGroupingColumn​(ValueNode node)
                                  throws StandardException
        Find the matching grouping column if any for the given expression
        Parameters:
        node - an expression for which we are trying to find a match in the group by list.
        Returns:
        the matching GroupByColumn if one exists, null otherwise.
        Throws:
        StandardException
      • remapColumnReferencesToExpressions

        void remapColumnReferencesToExpressions()
                                         throws StandardException
        Remap all ColumnReferences in this tree to be clones of the underlying expression.
        Throws:
        StandardException - Thrown on error
      • toString

        public java.lang.String toString()
        Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.
        Overrides:
        toString in class QueryTreeNode
        Returns:
        This object as a String