final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = lookup.bb.scope.resolve( originalRelName, ancestorScopes,
scope.resolve(name, null, null);
final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = scope.resolve(name, ancestorScopes, offsets); if (foundNs == null) { return null;
if (bb.scope != null) { identifier = bb.scope.fullyQualify(identifier); namespace = bb.scope.resolve(identifier.names.get(0), null, null);
public SqlValidatorNamespace resolve( String name, SqlValidatorScope[] ancestorOut, int[] offsetOut) { return parent.resolve(name, ancestorOut, offsetOut); }
public SqlValidatorNamespace resolve( String name, SqlValidatorScope [] ancestorOut, int [] offsetOut) { return parent.resolve(name, ancestorOut, offsetOut); }
final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = lookup.bb.scope.resolve( originalRelName, ancestorScopes,
final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = bb.scope.resolve( originalRelName, ancestorScopes,
/** * Resolves a multi-part identifier such as "SCHEMA.EMP.EMPNO" to a * namespace. The returned namespace, never null, may represent a * schema, table, column, etc. */ public static SqlValidatorNamespace lookup( SqlValidatorScope scope, List<String> names) { assert names.size() > 0; SqlValidatorNamespace namespace = null; for (int i = 0; i < names.size(); i++) { String name = names.get(i); if (i == 0) { namespace = scope.resolve(name, null, null); } else { namespace = namespace.lookupChild(name); } } assert namespace != null; return namespace; }
public SqlValidatorNamespace resolve( String name, SqlValidatorScope [] ancestorOut, int [] offsetOut) { // First resolve by looking through the child namespaces. final int i = Pair.left(children).indexOf(name); if (i >= 0) { if (ancestorOut != null) { ancestorOut[0] = this; } if (offsetOut != null) { offsetOut[0] = i; } return children.get(i).right; } // Then call the base class method, which will delegate to the // parent scope. return parent.resolve(name, ancestorOut, offsetOut); }
public SqlValidatorNamespace resolve( String name, SqlValidatorScope[] ancestorOut, int[] offsetOut) { // First resolve by looking through the child namespaces. final int i = validator.catalogReader.match(Pair.left(children), name); if (i >= 0) { if (ancestorOut != null) { ancestorOut[0] = this; } if (offsetOut != null) { offsetOut[0] = i; } return children.get(i).right; } // Then call the base class method, which will delegate to the // parent scope. return parent.resolve(name, ancestorOut, offsetOut); }
/** * Resolves a multi-part identifier such as "SCHEMA.EMP.EMPNO" to a * namespace. The returned namespace may represent a schema, table, column, * etc. * * @pre names.size() > 0 * @post return != null */ public static SqlValidatorNamespace lookup( SqlValidatorScope scope, List<String> names) { Util.pre(names.size() > 0, "names.size() > 0"); SqlValidatorNamespace namespace = null; for (int i = 0; i < names.size(); i++) { String name = names.get(i); if (i == 0) { namespace = scope.resolve(name, null, null); } else { namespace = namespace.lookupChild(name); } } Util.permAssert(namespace != null, "post: namespace != null"); return namespace; }
final SqlValidatorScope [] ancestorScopes = { null }; SqlValidatorNamespace foundNs = lookup.bb.scope.resolve( originalRelName, ancestorScopes,
final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = lookup.bb.scope.resolve( originalRelName, ancestorScopes,
private SqlValidatorNamespace getNamespace(SqlNode node, SqlValidatorScope scope) { if (node instanceof SqlIdentifier && scope instanceof DelegatingScope) { final SqlIdentifier id = (SqlIdentifier) node; final SqlValidatorScope parentScope = ((DelegatingScope) scope).getParent(); if (id.isSimple()) { SqlValidatorNamespace ns = parentScope.resolve(id.getSimple(), null, null); if (ns != null) { return ns; } } } return getNamespace(node); }
final SqlValidatorScope[] ancestorScopes = {null}; SqlValidatorNamespace foundNs = scope.resolve(name, ancestorScopes, offsets); if (foundNs == null) { return null;
final SqlValidatorScope [] ancestorScopes = { null }; SqlValidatorNamespace foundNs = scope.resolve(name, ancestorScopes, offsets); if (foundNs == null) { return null;
if (bb.scope != null) { identifier = bb.scope.fullyQualify(identifier); namespace = bb.scope.resolve(identifier.names.get(0), null, null);
for (String name : subNames) { if (ns == null) { ns = scope.resolve(name, null, null); } else { ns = ns.lookupChild(name);
if (bb.scope != null) { identifier = bb.scope.fullyQualify(identifier); namespace = bb.scope.resolve(identifier.names[0], null, null);