Class OverScope

  • All Implemented Interfaces:
    SqlValidatorScope

    public class OverScope
    extends ListScope
    The name-resolution scope of a OVER clause. The objects visible are those in the parameters found on the left side of the over clause, and objects inherited from the parent scope.

    This object is both a SqlValidatorScope only. In the query

    SELECT name FROM (
         SELECT *
         FROM emp OVER (
             ORDER BY empno
             RANGE BETWEEN 2 PRECEDING AND 2 FOLLOWING))
     

    We need to use the OverScope as a SqlValidatorNamespace when resolving names used in the window specification.

    • Field Detail

      • overCall

        private final SqlCall overCall
    • Constructor Detail

      • OverScope

        OverScope​(SqlValidatorScope parent,
                  SqlCall overCall)
        Creates a scope corresponding to a SELECT clause.
        Parameters:
        parent - Parent scope, or null
        overCall - Call to OVER operator