@VisibleForTesting public SqlValidatorScope getEmptyScope() { return new EmptyScope(this); }
public SqlNode validate(SqlNode topNode) { SqlValidatorScope scope = new EmptyScope(this); scope = new CatalogScope(scope, ImmutableList.of("CATALOG")); final SqlNode topNode2 = validateScopedExpression(topNode, scope); final RelDataType type = getValidatedNodeType(topNode2); Util.discard(type); return topNode2; }
public List<SqlMoniker> lookupHints(SqlNode topNode, SqlParserPos pos) { SqlValidatorScope scope = new EmptyScope(this); SqlNode outermostNode = performUnconditionalRewrites(topNode, false); cursorSet.add(outermostNode); if (outermostNode.isA(SqlKind.TOP_LEVEL)) { registerQuery( scope, null, outermostNode, outermostNode, null, false); } final SqlValidatorNamespace ns = getNamespace(outermostNode); if (ns == null) { throw new AssertionError("Not a query: " + outermostNode); } Collection<SqlMoniker> hintList = Sets.newTreeSet(SqlMoniker.COMPARATOR); lookupSelectHints(ns, pos, hintList); return ImmutableList.copyOf(hintList); }
@VisibleForTesting public SqlValidatorScope getEmptyScope() { return new EmptyScope(this); }
@VisibleForTesting public SqlValidatorScope getEmptyScope() { return new EmptyScope(this); }
public SqlNode validate(SqlNode topNode) { SqlValidatorScope scope = new EmptyScope(this); scope = new CatalogScope(scope, ImmutableList.of("CATALOG")); final SqlNode topNode2 = validateScopedExpression(topNode, scope); final RelDataType type = getValidatedNodeType(topNode2); Util.discard(type); return topNode2; }
public SqlNode validate(SqlNode topNode) { SqlValidatorScope scope = new EmptyScope(this); scope = new CatalogScope(scope, ImmutableList.of("CATALOG")); final SqlNode topNode2 = validateScopedExpression(topNode, scope); final RelDataType type = getValidatedNodeType(topNode2); Util.discard(type); return topNode2; }
public List<SqlMoniker> lookupHints(SqlNode topNode, SqlParserPos pos) { SqlValidatorScope scope = new EmptyScope(this); SqlNode outermostNode = performUnconditionalRewrites(topNode, false); cursorSet.add(outermostNode); if (outermostNode.isA(SqlKind.TOP_LEVEL)) { registerQuery( scope, null, outermostNode, outermostNode, null, false); } final SqlValidatorNamespace ns = getNamespace(outermostNode); if (ns == null) { throw new AssertionError("Not a query: " + outermostNode); } Collection<SqlMoniker> hintList = Sets.newTreeSet(SqlMoniker.COMPARATOR); lookupSelectHints(ns, pos, hintList); return ImmutableList.copyOf(hintList); }
public List<SqlMoniker> lookupHints(SqlNode topNode, SqlParserPos pos) { SqlValidatorScope scope = new EmptyScope(this); SqlNode outermostNode = performUnconditionalRewrites(topNode, false); cursorSet.add(outermostNode); if (outermostNode.isA(SqlKind.TOP_LEVEL)) { registerQuery( scope, null, outermostNode, outermostNode, null, false); } final SqlValidatorNamespace ns = getNamespace(outermostNode); if (ns == null) { throw new AssertionError("Not a query: " + outermostNode); } Collection<SqlMoniker> hintList = Sets.newTreeSet(SqlMoniker.COMPARATOR); lookupSelectHints(ns, pos, hintList); return ImmutableList.copyOf(hintList); }