final SqlIdentifier prefixId = identifier.skipLast(1); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final SqlNameMatcher nameMatcher = scope.validator.catalogReader.nameMatcher(); scope.resolve(prefixId.names, nameMatcher, true, resolved); if (resolved.count() == 0) { RESOURCE.unknownIdentifier(prefixId.toString())); final RelDataType rowType = resolved.only().rowType(); if (rowType.isDynamicStruct()) {
final ResolvedImpl resolved = new ResolvedImpl(); resolveInNamespace(namespace, false, identifier.names, nameMatcher, Path.EMPTY, resolved); Path fromPath = null; RelDataType fromRowType = null; final ResolvedImpl resolved = new ResolvedImpl(); int size = identifier.names.size(); int i = size - 1; for (; i > 0; i--) { final SqlIdentifier prefix = identifier.getComponent(0, i); resolved.clear(); resolve(prefix.names, nameMatcher, false, resolved); if (resolved.count() == 1) { final Resolve resolve = resolved.only(); fromNs = resolve.namespace; fromPath = resolve.path; resolved.clear(); resolve(prefix.names, liberalMatcher, false, resolved); if (resolved.count() == 1) { final Step lastStep = Util.last(resolved.only().path.steps()); throw validator.newValidationError(prefix, RESOURCE.tableNameNotFoundDidYouMean(prefix.toString(), if (resolved.count() == 1) { final Resolve resolve = resolved.only(); fromNs = resolve.namespace; fromPath = resolve.path;
final ResolvedImpl resolved = new ResolvedImpl(); resolveInNamespace(namespace, false, identifier.names, nameMatcher, Path.EMPTY, resolved); Path fromPath = null; RelDataType fromRowType = null; final ResolvedImpl resolved = new ResolvedImpl(); int size = identifier.names.size(); int i = size - 1; for (; i > 0; i--) { final SqlIdentifier prefix = identifier.getComponent(0, i); resolved.clear(); resolve(prefix.names, nameMatcher, false, resolved); if (resolved.count() == 1) { final Resolve resolve = resolved.only(); fromNs = resolve.namespace; fromPath = resolve.path; resolved.clear(); resolve(prefix.names, liberalMatcher, false, resolved); if (resolved.count() == 1) { final Step lastStep = Util.last(resolved.only().path.steps()); throw validator.newValidationError(prefix, RESOURCE.tableNameNotFoundDidYouMean(prefix.toString(), if (resolved.count() == 1) { final Resolve resolve = resolved.only(); fromNs = resolve.namespace; fromPath = resolve.path;
lookup.bb.scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); lookup.bb.scope.resolve(ImmutableList.of(originalRelName), nameMatcher, false, resolved); assert resolved.count() == 1; final SqlValidatorScope.Resolve resolve = resolved.only(); final SqlValidatorNamespace foundNs = resolve.namespace; final RelDataType rowType = resolve.rowType();
lookup.bb.scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); lookup.bb.scope.resolve(ImmutableList.of(originalRelName), nameMatcher, false, resolved); assert resolved.count() == 1; final SqlValidatorScope.Resolve resolve = resolved.only(); final SqlValidatorNamespace foundNs = resolve.namespace; final RelDataType rowType = resolve.rowType();
final SqlIdentifier prefixId = identifier.skipLast(1); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final SqlNameMatcher nameMatcher = scope.validator.catalogReader.nameMatcher(); scope.resolve(prefixId.names, nameMatcher, true, resolved); if (resolved.count() == 0) { RESOURCE.unknownIdentifier(prefixId.toString())); final RelDataType rowType = resolved.only().rowType(); if (rowType.isDynamicStruct()) {
final SqlIdentifier prefixId = identifier.skipLast(1); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final SqlNameMatcher nameMatcher = scope.validator.catalogReader.nameMatcher(); scope.resolve(prefixId.names, nameMatcher, true, resolved); if (resolved.count() == 0) { RESOURCE.unknownIdentifier(prefixId.toString())); final RelDataType rowType = resolved.only().rowType(); if (rowType.isDynamicStruct()) {
bb.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); lookup.bb.scope.resolve(ImmutableList.of(originalRelName), nameMatcher, false, resolved); assert resolved.count() == 1; final SqlValidatorScope.Resolve resolve = resolved.only(); final SqlValidatorNamespace foundNs = resolve.namespace; final RelDataType rowType = resolve.rowType();
bb.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); lookup.bb.scope.resolve(ImmutableList.of(originalRelName), nameMatcher, false, resolved); assert resolved.count() == 1; final SqlValidatorScope.Resolve resolve = resolved.only(); final SqlValidatorNamespace foundNs = resolve.namespace; final RelDataType rowType = resolve.rowType();
scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(qualified.prefix(), nameMatcher, false, resolved); if (!(resolved.count() == 1)) { return null; final SqlValidatorScope.Resolve resolve = resolved.only(); final RelDataType rowType = resolve.rowType();
scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(qualified.prefix(), nameMatcher, false, resolved); if (!(resolved.count() == 1)) { return null; final SqlValidatorScope.Resolve resolve = resolved.only(); final RelDataType rowType = resolve.rowType();
new SqlValidatorScope.ResolvedImpl(); scope.resolve(id.names.subList(0, i), nameMatcher, false, resolved); if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = resolved.only(); type = resolve.rowType(); for (SqlValidatorScope.Step p : Util.skip(resolve.path.steps())) {
private SqlValidatorNamespace resolveImpl(SqlIdentifier id) { final SqlNameMatcher nameMatcher = validator.catalogReader.nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final List<String> names = SqlIdentifier.toStar(id.names); try { if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = previousResolve = resolved.only(); if (resolve.remainingNames.isEmpty()) { return resolve.namespace; resolved.clear(); parentScope.resolveTable(names, liberalMatcher, SqlValidatorScope.Path.EMPTY, resolved); if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = resolved.only(); if (resolve.remainingNames.isEmpty() || previousResolve == null) {
scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(qualified.prefix(), nameMatcher, false, resolved); if (!(resolved.count() == 1)) { return null; final SqlValidatorScope.Resolve resolve = resolved.only(); final RelDataType rowType = resolve.rowType();
if (ns == null) { final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final SqlNameMatcher nameMatcher = catalogReader.nameMatcher(); scope.resolve(ImmutableList.of(name), nameMatcher, false, resolved); if (resolved.count() == 1) { ns = resolved.only().namespace;
private SqlValidatorNamespace resolveImpl(SqlIdentifier id) { final SqlNameMatcher nameMatcher = validator.catalogReader.nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final List<String> names = SqlIdentifier.toStar(id.names); try { if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = previousResolve = resolved.only(); if (resolve.remainingNames.isEmpty()) { return resolve.namespace; resolved.clear(); parentScope.resolveTable(names, liberalMatcher, SqlValidatorScope.Path.EMPTY, resolved); if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = resolved.only(); if (resolve.remainingNames.isEmpty() || previousResolve == null) {
new SqlValidatorScope.ResolvedImpl(); scope.resolve(id.names.subList(0, i), nameMatcher, false, resolved); if (resolved.count() == 1) { final SqlValidatorScope.Resolve resolve = resolved.only(); type = resolve.rowType(); for (SqlValidatorScope.Step p : Util.skip(resolve.path.steps())) {
if (ns == null) { final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); final SqlNameMatcher nameMatcher = catalogReader.nameMatcher(); scope.resolve(ImmutableList.of(name), nameMatcher, false, resolved); if (resolved.count() == 1) { ns = resolved.only().namespace;
scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(qualified.prefix(), nameMatcher, false, resolved); if (!(resolved.count() == 1)) { return null; final SqlValidatorScope.Resolve resolve = resolved.only(); final RelDataType rowType = resolve.rowType();
scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(ImmutableList.of(originalRelName), nameMatcher, false, resolved); assert resolved.count() == 1; final SqlValidatorScope.Resolve resolve = resolved.only(); final RelDataType rowType = resolve.rowType(); final int childNamespaceIndex = resolve.path.steps().get(0).i;