private SqlValidatorNamespace getNamespace(SqlIdentifier id, DelegatingScope scope) { if (id.isSimple()) { final SqlNameMatcher nameMatcher = catalogReader.nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(id.names, nameMatcher, false, resolved); if (resolved.count() == 1) { return resolved.only().namespace; } } return getNamespace(id); }
final SqlIdentifier prefix = identifier.getComponent(0, i); resolved.clear(); resolve(prefix.names, nameMatcher, false, resolved); if (resolved.count() == 1) { final Resolve resolve = resolved.only(); final SqlNameMatcher liberalMatcher = SqlNameMatchers.liberal(); resolved.clear(); resolve(prefix.names, liberalMatcher, false, resolved); if (resolved.count() == 1) { final Step lastStep = Util.last(resolved.only().path.steps()); case PEEK_FIELDS_NO_EXPAND: resolve(ImmutableList.of(tableName2), nameMatcher, false, resolved); if (resolved.count() == 1) {
final SqlIdentifier prefix = identifier.getComponent(0, i); resolved.clear(); resolve(prefix.names, nameMatcher, false, resolved); if (resolved.count() == 1) { final Resolve resolve = resolved.only(); final SqlNameMatcher liberalMatcher = SqlNameMatchers.liberal(); resolved.clear(); resolve(prefix.names, liberalMatcher, false, resolved); if (resolved.count() == 1) { final Step lastStep = Util.last(resolved.only().path.steps()); case PEEK_FIELDS_NO_EXPAND: resolve(ImmutableList.of(tableName2), nameMatcher, false, resolved); if (resolved.count() == 1) {
super.resolve(names, nameMatcher, deep, resolved);
super.resolve(names, nameMatcher, deep, resolved);
private SqlValidatorNamespace getNamespace(SqlIdentifier id, DelegatingScope scope) { if (id.isSimple()) { final SqlNameMatcher nameMatcher = catalogReader.nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(id.names, nameMatcher, false, resolved); if (resolved.count() == 1) { return resolved.only().namespace; } } return getNamespace(id); }
private SqlValidatorNamespace getNamespace(SqlIdentifier id, DelegatingScope scope) { if (id.isSimple()) { final SqlNameMatcher nameMatcher = catalogReader.nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(id.names, nameMatcher, false, resolved); if (resolved.count() == 1) { return resolved.only().namespace; } } return getNamespace(id); }