Class Planner.QuerySelectColumnSet

  • Enclosing class:
    Planner

    private static class Planner.QuerySelectColumnSet
    extends java.lang.Object
    A container object for the set of SelectColumn objects selected in a query.
    • Field Detail

      • FUNCTION_TABLE_NAME

        private static TableName FUNCTION_TABLE_NAME
        The name of the table where functions are defined.
      • s_col_list

        java.util.ArrayList s_col_list
        The list of SelectColumn.
      • function_col_list

        java.util.ArrayList function_col_list
        The list of functions in this column set.
      • running_fun_number

        private int running_fun_number
        The current number of 'FUNCTIONTABLE.' columns in the table. This is incremented for each custom column.
      • aggregate_count

        int aggregate_count
        The count of aggregate and constant columns included in the result set. Aggregate columns are, (count(*), avg(cost_of) * 0.75, etc). Constant columns are, (9 * 4, 2, (9 * 7 / 4) + 4, etc).
      • constant_count

        int constant_count
        The count of aggregate and constant columns included in the result set. Aggregate columns are, (count(*), avg(cost_of) * 0.75, etc). Constant columns are, (9 * 4, 2, (9 * 7 / 4) + 4, etc).
    • Constructor Detail

    • Method Detail

      • selectSingleColumn

        void selectSingleColumn​(SelectColumn col)
        Adds a single SelectColumn to the list of output columns from the query.

        Note that at this point the the information in the given SelectColumn may not be completely qualified.

      • addAllFromTable

        void addAllFromTable​(FromTableInterface table)
        Adds all columns from the given FromTableInterface object.
      • selectAllColumnsFromSource

        void selectAllColumnsFromSource​(TableName table_name)
        Adds all column from the given table object. This is used to set up the columns that are to be viewed as the result of the select statement.
      • selectAllColumnsFromAllSources

        void selectAllColumnsFromAllSources()
        Sets up this queriable with all columns from all table sources.
      • addHiddenFunction

        Variable addHiddenFunction​(java.lang.String fun_alias,
                                   Expression function,
                                   QueryContext context)
        Adds a new hidden function into the column set. This is intended to be used for implied functions. For example, a query may have a function in a GROUP BY clause. It's desirable to include the function in the column set but not in the final result.

        Returns an absolute Variable object that can be used to reference this hidden column.