Class OrderedColumn

  • All Implemented Interfaces:
    Visitable
    Direct Known Subclasses:
    GroupByColumn, OrderByColumn

    public abstract class OrderedColumn
    extends QueryTreeNode
    An ordered column has position. It is an abstract class for group by and order by columns.
    • Field Detail

      • columnPosition

        protected int columnPosition
    • Method Detail

      • isAscending

        boolean isAscending()
        Indicate whether this column is ascending or not. By default assume that all ordered columns are necessarily ascending. If this class is inherited by someone that can be desceneded, they are expected to override this method.
        Returns:
        true
      • isNullsOrderedLow

        boolean isNullsOrderedLow()
        Indicate whether this column should be ordered NULLS low. By default we assume that all ordered columns are ordered with NULLS higher than non-null values. If this class is inherited by someone that can be specified to have NULLs ordered lower than non-null values, they are expected to override this method.
        Returns:
        false
      • 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
      • getColumnPosition

        int getColumnPosition()
        Get the position of this column
        Returns:
        The position of this column
      • setColumnPosition

        void setColumnPosition​(int columnPosition)
        Set the position of this column