Class ProcedureNamespace

  • All Implemented Interfaces:
    org.apache.calcite.sql.validate.SqlValidatorNamespace

    @Internal
    public final class ProcedureNamespace
    extends Object
    Namespace whose contents are defined by the result of a call to a user-defined procedure.

    Note: Compared to Calcite, this class implements custom logic for dealing with collection tables like TABLE(function(...)) procedures. Compared to the SQL standard, Flink's table functions can return arbitrary types that are wrapped into a ROW type if necessary. We don't interpret ARRAY or MULTISET types as it would be standard.

    • Field Detail

      • rowType

        protected org.apache.calcite.rel.type.RelDataType rowType
      • type

        protected org.apache.calcite.rel.type.RelDataType type
      • enclosingNode

        protected final org.apache.calcite.sql.SqlNode enclosingNode
    • Method Detail

      • validateImpl

        public org.apache.calcite.rel.type.RelDataType validateImpl​(org.apache.calcite.rel.type.RelDataType targetRowType)
      • toStruct

        protected org.apache.calcite.rel.type.RelDataType toStruct​(org.apache.calcite.rel.type.RelDataType type,
                                                                   org.apache.calcite.sql.SqlNode unnest)
        Converts a type to a struct if it is not already.
      • getNode

        public org.apache.calcite.sql.SqlNode getNode()
      • getValidator

        public org.apache.calcite.sql.validate.SqlValidator getValidator()
        Specified by:
        getValidator in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • validate

        public final void validate​(org.apache.calcite.rel.type.RelDataType arg0)
        Specified by:
        validate in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getRowType

        public org.apache.calcite.rel.type.RelDataType getRowType()
        Specified by:
        getRowType in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getRowTypeSansSystemColumns

        public org.apache.calcite.rel.type.RelDataType getRowTypeSansSystemColumns()
        Specified by:
        getRowTypeSansSystemColumns in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getType

        public org.apache.calcite.rel.type.RelDataType getType()
        Specified by:
        getType in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • setType

        public void setType​(org.apache.calcite.rel.type.RelDataType arg0)
        Specified by:
        setType in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getEnclosingNode

        public org.apache.calcite.sql.SqlNode getEnclosingNode()
        Specified by:
        getEnclosingNode in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getTable

        public org.apache.calcite.sql.validate.SqlValidatorTable getTable()
        Specified by:
        getTable in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • lookupChild

        public org.apache.calcite.sql.validate.SqlValidatorNamespace lookupChild​(String arg0)
        Specified by:
        lookupChild in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • fieldExists

        public boolean fieldExists​(String arg0)
        Specified by:
        fieldExists in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getMonotonicExprs

        public List<org.apache.calcite.util.Pair<org.apache.calcite.sql.SqlNode,​org.apache.calcite.sql.validate.SqlMonotonicity>> getMonotonicExprs()
        Specified by:
        getMonotonicExprs in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • getMonotonicity

        public org.apache.calcite.sql.validate.SqlMonotonicity getMonotonicity​(String arg0)
        Specified by:
        getMonotonicity in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • makeNullable

        public void makeNullable()
        Specified by:
        makeNullable in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • resolve

        public org.apache.calcite.sql.validate.SqlValidatorNamespace resolve()
        Specified by:
        resolve in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • supportsModality

        public boolean supportsModality​(org.apache.calcite.sql.validate.SqlModality arg0)
        Specified by:
        supportsModality in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • unwrap

        public <T extends Object> T unwrap​(Class<T> arg0)
        Specified by:
        unwrap in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • isWrapperFor

        public boolean isWrapperFor​(Class<?> arg0)
        Specified by:
        isWrapperFor in interface org.apache.calcite.sql.validate.SqlValidatorNamespace
      • convertToStruct

        protected org.apache.calcite.rel.type.RelDataType convertToStruct​(org.apache.calcite.rel.type.RelDataType arg0)