public class MatchRecognizeScope extends ListScope
MATCH_RECOGNIZE clause.
Defines variables and uses them as prefix of columns reference.
SqlValidatorScope.EmptyPath, SqlValidatorScope.Path, SqlValidatorScope.Resolve, SqlValidatorScope.Resolved, SqlValidatorScope.ResolvedImpl, SqlValidatorScope.Step| Modifier and Type | Field and Description |
|---|---|
private SqlMatchRecognize |
matchRecognize |
private Set<String> |
patternVars |
private static String |
STAR |
parent, validator| Constructor and Description |
|---|
MatchRecognizeScope(SqlValidatorScope parent,
SqlMatchRecognize matchRecognize)
Creates a MatchRecognizeScope.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPatternVar(String str) |
Map<String,ScopeChild> |
findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher)
Finds all table aliases which are implicitly qualifying an unqualified
column name.
|
SqlMatchRecognize |
getMatchRecognize() |
SqlNode |
getNode()
Returns the root node of this scope.
|
Set<String> |
getPatternVars() |
void |
resolve(List<String> names,
SqlNameMatcher nameMatcher,
boolean deep,
SqlValidatorScope.Resolved resolved)
Looks up a node with a given name.
|
addChild, findAliases, findAllColumnNames, findQualifyingTableName, getChildNames, getChildren, resolveColumnaddColumnNames, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, lookupWindow, nullifyType, resolveInNamespace, resolveTable, validateExprprivate static final String STAR
private final SqlMatchRecognize matchRecognize
public MatchRecognizeScope(SqlValidatorScope parent, SqlMatchRecognize matchRecognize)
public SqlNode getNode()
SqlValidatorScopepublic SqlMatchRecognize getMatchRecognize()
public void addPatternVar(String str)
public Map<String,ScopeChild> findQualifyingTableNames(String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
SqlValidatorScopeThis 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.
findQualifyingTableNames in interface SqlValidatorScopefindQualifyingTableNames in class ListScopecolumnName - Column namectx - Validation context, to appear in any error thrownnameMatcher - Name matcherpublic void resolve(List<String> names, SqlNameMatcher nameMatcher, boolean deep, SqlValidatorScope.Resolved resolved)
SqlValidatorScoperesolve in interface SqlValidatorScoperesolve in class ListScopenames - Name of node to find, maybe partially or fully qualifiednameMatcher - Name matcherdeep - Whether to look more than one level deepresolved - Callback wherein to write the match(es) we findCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.