blob: 31f04d3e5ba2e49f811f13c9666d2c60d4a24de1 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>SqlValidatorWithHints (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.sql.validate, interface: SqlValidatorWithHints">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.sql.validate</a></div>
<h1 title="Interface SqlValidatorWithHints" class="title">Interface SqlValidatorWithHints</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../../jdbc/ContextSqlValidator.html" title="class in org.apache.calcite.jdbc">ContextSqlValidator</a></code>, <code><a href="../advise/SqlAdvisorValidator.html" title="class in org.apache.calcite.sql.advise">SqlAdvisorValidator</a></code>, <code><a href="SqlValidatorImpl.html" title="class in org.apache.calcite.sql.validate">SqlValidatorImpl</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">SqlValidatorWithHints</span><span class="extends-implements">
extends <a href="SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a></span></div>
<div class="block">Extends <a href="SqlValidator.html" title="interface in org.apache.calcite.sql.validate"><code>SqlValidator</code></a> to allow discovery of useful data such as fully
qualified names of SQL objects, alternative valid SQL objects that can be
used in the SQL statement (dubbed as hints).</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="inherited-list">
<h2 id="nested-classes-inherited-from-class-org.apache.calcite.sql.validate.SqlValidator">Nested classes/interfaces inherited from interface&nbsp;org.apache.calcite.sql.validate.<a href="SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a></h2>
<code><a href="SqlValidator.Config.html" title="interface in org.apache.calcite.sql.validate">SqlValidator.Config</a></code></div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="SqlMoniker.html" title="interface in org.apache.calcite.sql.validate">SqlMoniker</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#lookupHints(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">lookupHints</a><wbr>(<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;topNode,
<a href="../parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Looks up completion hints for a syntactically correct SQL statement that
has been parsed into an expression tree.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>@Nullable <a href="SqlMoniker.html" title="interface in org.apache.calcite.sql.validate">SqlMoniker</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#lookupQualifiedName(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.parser.SqlParserPos)" class="member-name-link">lookupQualifiedName</a><wbr>(<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;topNode,
<a href="../parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Looks up the fully qualified name for a <a href="../SqlIdentifier.html" title="class in org.apache.calcite.sql"><code>SqlIdentifier</code></a> at a given
Parser Position in a parsed expression tree Note: call this only after
<a href="SqlValidator.html#validate(org.apache.calcite.sql.SqlNode)"><code>SqlValidator.validate(org.apache.calcite.sql.SqlNode)</code></a> has been called.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.calcite.sql.validate.SqlValidator">Methods inherited from interface&nbsp;org.apache.calcite.sql.validate.<a href="SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a></h3>
<code><a href="SqlValidator.html#config()">config</a>, <a href="SqlValidator.html#declareCursor(org.apache.calcite.sql.SqlSelect,org.apache.calcite.sql.validate.SqlValidatorScope)">declareCursor</a>, <a href="SqlValidator.html#deriveAlias(org.apache.calcite.sql.SqlNode,int)">deriveAlias</a>, <a href="SqlValidator.html#deriveConstructorType(org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlFunction,org.apache.calcite.sql.SqlFunction,java.util.List)">deriveConstructorType</a>, <a href="SqlValidator.html#deriveType(org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlNode)">deriveType</a>, <a href="SqlValidator.html#expand(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlValidatorScope)">expand</a>, <a href="SqlValidator.html#expandOrderExpr(org.apache.calcite.sql.SqlSelect,org.apache.calcite.sql.SqlNode)">expandOrderExpr</a>, <a href="SqlValidator.html#expandStar(org.apache.calcite.sql.SqlNodeList,org.apache.calcite.sql.SqlSelect,boolean)">expandStar</a>, <a href="SqlValidator.html#getCatalogReader()">getCatalogReader</a>, <a href="SqlValidator.html#getFieldOrigins(org.apache.calcite.sql.SqlNode)">getFieldOrigins</a>, <a href="SqlValidator.html#getFromScope(org.apache.calcite.sql.SqlSelect)">getFromScope</a>, <a href="SqlValidator.html#getGroupScope(org.apache.calcite.sql.SqlSelect)">getGroupScope</a>, <a href="SqlValidator.html#getHavingScope(org.apache.calcite.sql.SqlSelect)">getHavingScope</a>, <a href="SqlValidator.html#getJoinScope(org.apache.calcite.sql.SqlNode)">getJoinScope</a>, <a href="SqlValidator.html#getMatchRecognizeScope(org.apache.calcite.sql.SqlMatchRecognize)">getMatchRecognizeScope</a>, <a href="SqlValidator.html#getNamespace(org.apache.calcite.sql.SqlNode)">getNamespace</a>, <a href="SqlValidator.html#getOperatorTable()">getOperatorTable</a>, <a href="SqlValidator.html#getOrderScope(org.apache.calcite.sql.SqlSelect)">getOrderScope</a>, <a href="SqlValidator.html#getOverScope(org.apache.calcite.sql.SqlNode)">getOverScope</a>, <a href="SqlValidator.html#getParameterRowType(org.apache.calcite.sql.SqlNode)">getParameterRowType</a>, <a href="SqlValidator.html#getParentCursor(java.lang.String)">getParentCursor</a>, <a href="SqlValidator.html#getRawSelectScope(org.apache.calcite.sql.SqlSelect)">getRawSelectScope</a>, <a href="SqlValidator.html#getSelectScope(org.apache.calcite.sql.SqlSelect)">getSelectScope</a>, <a href="SqlValidator.html#getTimeFrameSet()">getTimeFrameSet</a>, <a href="SqlValidator.html#getTypeCoercion()">getTypeCoercion</a>, <a href="SqlValidator.html#getTypeFactory()">getTypeFactory</a>, <a href="SqlValidator.html#getUnknownType()">getUnknownType</a>, <a href="SqlValidator.html#getValidatedNodeType(org.apache.calcite.sql.SqlNode)">getValidatedNodeType</a>, <a href="SqlValidator.html#getValidatedNodeTypeIfKnown(org.apache.calcite.sql.SqlNode)">getValidatedNodeTypeIfKnown</a>, <a href="SqlValidator.html#getValidatedOperandTypes(org.apache.calcite.sql.SqlCall)">getValidatedOperandTypes</a>, <a href="SqlValidator.html#getWhereScope(org.apache.calcite.sql.SqlSelect)">getWhereScope</a>, <a href="SqlValidator.html#getWithScope(org.apache.calcite.sql.SqlNode)">getWithScope</a>, <a href="SqlValidator.html#handleUnresolvedFunction(org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlOperator,java.util.List,java.util.List)">handleUnresolvedFunction</a>, <a href="SqlValidator.html#isAggregate(org.apache.calcite.sql.SqlNode)">isAggregate</a>, <a href="SqlValidator.html#isAggregate(org.apache.calcite.sql.SqlSelect)">isAggregate</a>, <a href="SqlValidator.html#isSystemField(org.apache.calcite.rel.type.RelDataTypeField)">isSystemField</a>, <a href="SqlValidator.html#makeNullaryCall(org.apache.calcite.sql.SqlIdentifier)">makeNullaryCall</a>, <a href="SqlValidator.html#newValidationError(org.apache.calcite.sql.SqlNode,org.apache.calcite.runtime.Resources.ExInst)">newValidationError</a>, <a href="SqlValidator.html#popFunctionCall()">popFunctionCall</a>, <a href="SqlValidator.html#pushFunctionCall()">pushFunctionCall</a>, <a href="SqlValidator.html#removeValidatedNodeType(org.apache.calcite.sql.SqlNode)">removeValidatedNodeType</a>, <a href="SqlValidator.html#resolveLiteral(org.apache.calcite.sql.SqlLiteral)">resolveLiteral</a>, <a href="SqlValidator.html#resolveWindow(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlValidatorScope)">resolveWindow</a>, <a href="SqlValidator.html#resolveWindow(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlValidatorScope,boolean)">resolveWindow</a>, <a href="SqlValidator.html#setValidatedNodeType(org.apache.calcite.sql.SqlNode,org.apache.calcite.rel.type.RelDataType)">setValidatedNodeType</a>, <a href="SqlValidator.html#transform(java.util.function.UnaryOperator)">transform</a>, <a href="SqlValidator.html#validate(org.apache.calcite.sql.SqlNode)">validate</a>, <a href="SqlValidator.html#validateAggregateParams(org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNodeList,org.apache.calcite.sql.SqlNodeList,org.apache.calcite.sql.validate.SqlValidatorScope)">validateAggregateParams</a>, <a href="SqlValidator.html#validateCall(org.apache.calcite.sql.SqlCall,org.apache.calcite.sql.validate.SqlValidatorScope)">validateCall</a>, <a href="SqlValidator.html#validateColumnListParams(org.apache.calcite.sql.SqlFunction,java.util.List,java.util.List)">validateColumnListParams</a>, <a href="SqlValidator.html#validateDataType(org.apache.calcite.sql.SqlDataTypeSpec)">validateDataType</a>, <a href="SqlValidator.html#validateDelete(org.apache.calcite.sql.SqlDelete)">validateDelete</a>, <a href="SqlValidator.html#validateDynamicParam(org.apache.calcite.sql.SqlDynamicParam)">validateDynamicParam</a>, <a href="SqlValidator.html#validateIdentifier(org.apache.calcite.sql.SqlIdentifier,org.apache.calcite.sql.validate.SqlValidatorScope)">validateIdentifier</a>, <a href="SqlValidator.html#validateInsert(org.apache.calcite.sql.SqlInsert)">validateInsert</a>, <a href="SqlValidator.html#validateIntervalQualifier(org.apache.calcite.sql.SqlIntervalQualifier)">validateIntervalQualifier</a>, <a href="SqlValidator.html#validateLiteral(org.apache.calcite.sql.SqlLiteral)">validateLiteral</a>, <a href="SqlValidator.html#validateMatchRecognize(org.apache.calcite.sql.SqlCall)">validateMatchRecognize</a>, <a href="SqlValidator.html#validateMerge(org.apache.calcite.sql.SqlMerge)">validateMerge</a>, <a href="SqlValidator.html#validateModality(org.apache.calcite.sql.SqlSelect,org.apache.calcite.sql.validate.SqlModality,boolean)">validateModality</a>, <a href="SqlValidator.html#validateParameterizedExpression(org.apache.calcite.sql.SqlNode,java.util.Map)">validateParameterizedExpression</a>, <a href="SqlValidator.html#validateQuery(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.rel.type.RelDataType)">validateQuery</a>, <a href="SqlValidator.html#validateSequenceValue(org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlIdentifier)">validateSequenceValue</a>, <a href="SqlValidator.html#validateTimeFrame(org.apache.calcite.sql.SqlIntervalQualifier)">validateTimeFrame</a>, <a href="SqlValidator.html#validateUpdate(org.apache.calcite.sql.SqlUpdate)">validateUpdate</a>, <a href="SqlValidator.html#validateWindow(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.SqlCall)">validateWindow</a>, <a href="SqlValidator.html#validateWith(org.apache.calcite.sql.SqlWith,org.apache.calcite.sql.validate.SqlValidatorScope)">validateWith</a>, <a href="SqlValidator.html#validateWithItem(org.apache.calcite.sql.SqlWithItem)">validateWithItem</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="lookupHints(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>lookupHints</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="SqlMoniker.html" title="interface in org.apache.calcite.sql.validate">SqlMoniker</a>&gt;</span>&nbsp;<span class="element-name">lookupHints</span><wbr><span class="parameters">(<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;topNode,
<a href="../parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Looks up completion hints for a syntactically correct SQL statement that
has been parsed into an expression tree. (Note this should be called
after <a href="SqlValidator.html#validate(org.apache.calcite.sql.SqlNode)"><code>SqlValidator.validate(org.apache.calcite.sql.SqlNode)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>topNode</code> - top of expression tree in which to lookup completion hints</dd>
<dd><code>pos</code> - indicates the position in the sql statement we want to get
completion hints for. For example, "select a.ename, b.deptno
from sales.emp a join sales.dept b "on a.deptno=b.deptno
where empno=1"; setting pos to 'Line 1, Column 17' returns
all the possible column names that can be selected from
sales.dept table setting pos to 'Line 1, Column 31' returns
all the possible table names in 'sales' schema</dd>
<dt>Returns:</dt>
<dd>an array of <a href="SqlMoniker.html" title="interface in org.apache.calcite.sql.validate"><code>SqlMoniker</code></a> (sql identifiers) that can fill in
at the indicated position</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="lookupQualifiedName(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.parser.SqlParserPos)">
<h3>lookupQualifiedName</h3>
<div class="member-signature"><span class="return-type">@Nullable <a href="SqlMoniker.html" title="interface in org.apache.calcite.sql.validate">SqlMoniker</a></span>&nbsp;<span class="element-name">lookupQualifiedName</span><wbr><span class="parameters">(<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;topNode,
<a href="../parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a>&nbsp;pos)</span></div>
<div class="block">Looks up the fully qualified name for a <a href="../SqlIdentifier.html" title="class in org.apache.calcite.sql"><code>SqlIdentifier</code></a> at a given
Parser Position in a parsed expression tree Note: call this only after
<a href="SqlValidator.html#validate(org.apache.calcite.sql.SqlNode)"><code>SqlValidator.validate(org.apache.calcite.sql.SqlNode)</code></a> has been called.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>topNode</code> - top of expression tree in which to lookup the qualified
name for the SqlIdentifier</dd>
<dd><code>pos</code> - indicates the position of the <a href="../SqlIdentifier.html" title="class in org.apache.calcite.sql"><code>SqlIdentifier</code></a> in
the SQL statement we want to get the qualified
name for</dd>
<dt>Returns:</dt>
<dd>a string of the fully qualified name of the <a href="../SqlIdentifier.html" title="class in org.apache.calcite.sql"><code>SqlIdentifier</code></a>
if the Parser position represents a valid <a href="../SqlIdentifier.html" title="class in org.apache.calcite.sql"><code>SqlIdentifier</code></a>. Else
return null</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>