Class MatchRecognizeScope

  • All Implemented Interfaces:

    public class MatchRecognizeScope
    extends ListScope
    Scope for expressions in a MATCH_RECOGNIZE clause.

    Defines variables and uses them as prefix of columns reference.

    • Field Detail

      • patternVars

        private final java.util.Set<java.lang.String> patternVars
    • Method Detail

      • getNode

        public SqlNode getNode()
        Description copied from interface: SqlValidatorScope
        Returns the root node of this scope. Never null.
      • getPatternVars

        public java.util.Set<java.lang.String> getPatternVars()
      • addPatternVar

        public void addPatternVar​(java.lang.String str)
      • findQualifyingTableNames

        public java.util.Map<java.lang.String,​ScopeChild> findQualifyingTableNames​(java.lang.String columnName,
                                                                                         SqlNode ctx,
                                                                                         SqlNameMatcher nameMatcher)
        Description copied from interface: SqlValidatorScope
        Finds all table aliases which are implicitly qualifying an unqualified column name.

        This method is only implemented in scopes (such as SelectScope) which can be the context for name-resolution. In scopes such as IdentifierNamespace, it throws UnsupportedOperationException.

        Specified by:
        findQualifyingTableNames in interface SqlValidatorScope
        findQualifyingTableNames in class ListScope
        columnName - Column name
        ctx - Validation context, to appear in any error thrown
        nameMatcher - Name matcher
        Map of applicable table alias and namespaces, never null, empty if no aliases found
      • resolve

        public void resolve​(java.util.List<java.lang.String> names,
                            SqlNameMatcher nameMatcher,
                            boolean deep,
                            SqlValidatorScope.Resolved resolved)
        Description copied from interface: SqlValidatorScope
        Looks up a node with a given name. Returns null if none is found.
        Specified by:
        resolve in interface SqlValidatorScope
        resolve in class ListScope
        names - Name of node to find, maybe partially or fully qualified
        nameMatcher - Name matcher
        deep - Whether to look more than one level deep
        resolved - Callback wherein to write the match(es) we find