blob: 2daa47b41ee6a8ada53d7279af05826112c482ff [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="zh">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HintPredicate (Apache Calcite calcite API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HintPredicate (Apache Calcite calcite API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6};
var tabs = {65535:["t0","所有方法"],2:["t2","实例方法"],4:["t3","抽象方法"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>您的浏览器已禁用 JavaScript。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../../../overview-summary.html">概览</a></li>
<li><a href="package-summary.html">程序包</a></li>
<li class="navBarCell1Rev"></li>
<li><a href="package-tree.html"></a></li>
<li><a href="../../../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../../../index-all.html">索引</a></li>
<li><a href="../../../../../help-doc.html">帮助</a></li>
</ul>
<div class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/calcite/rel/hint/HintOptionChecker.html" title="org.apache.calcite.rel.hint中的接口"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../../org/apache/calcite/rel/hint/HintPredicates.html" title="org.apache.calcite.rel.hint中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/calcite/rel/hint/HintPredicate.html" target="_top">框架</a></li>
<li><a href="HintPredicate.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">所有类</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>概要:&nbsp;</li>
<li>嵌套&nbsp;|&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.detail">方法</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.calcite.rel.hint</div>
<h2 title="接口 HintPredicate" class="title">接口 HintPredicate</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>所有已知实现类:</dt>
<dd><a href="../../../../../org/apache/calcite/rel/hint/CompositeHintPredicate.html" title="org.apache.calcite.rel.hint中的类">CompositeHintPredicate</a>, <a href="../../../../../org/apache/calcite/rel/hint/NodeTypeHintPredicate.html" title="org.apache.calcite.rel.hint中的类">NodeTypeHintPredicate</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">HintPredicate</span></pre>
<div class="block">A <code>HintPredicate</code> indicates whether a <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口"><code>RelNode</code></a>
can apply the specified hint.
<p>Every supported hint should register a <code>HintPredicate</code>
into the <a href="../../../../../org/apache/calcite/rel/hint/HintStrategyTable.html" title="org.apache.calcite.rel.hint中的类"><code>HintStrategyTable</code></a>. For example, <a href="../../../../../org/apache/calcite/rel/hint/HintPredicates.html#JOIN"><code>HintPredicates.JOIN</code></a> implies
that this hint would be propagated and applied to the <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="org.apache.calcite.rel.core中的类"><code>Join</code></a>
relational expressions.
<p>Usually use <a href="../../../../../org/apache/calcite/rel/hint/NodeTypeHintPredicate.html" title="org.apache.calcite.rel.hint中的类"><code>NodeTypeHintPredicate</code></a> is enough for most of the <a href="../../../../../org/apache/calcite/rel/hint/RelHint.html" title="org.apache.calcite.rel.hint中的类"><code>RelHint</code></a>s.
Some of the hints can only be matched to the relational expression with special
match conditions(not only the relational expression type).
i.e. "hash_join(r, st)", this hint can only be applied to JOIN expression that
has "r" and "st" as the input table names. To implement this, you can make a custom
<code>HintPredicate</code> instance.
<p>A <code>HintPredicate</code> can be used independently or cascaded with other strategies
with method <a href="../../../../../org/apache/calcite/rel/hint/HintPredicates.html#and-org.apache.calcite.rel.hint.HintPredicate...-"><code>HintPredicates.and(org.apache.calcite.rel.hint.HintPredicate...)</code></a>.
<p>In <a href="../../../../../org/apache/calcite/rel/hint/HintStrategyTable.html" title="org.apache.calcite.rel.hint中的类"><code>HintStrategyTable</code></a> the predicate is used for
hints registration.</div>
<dl>
<dt><span class="seeLabel">另请参阅:</span></dt>
<dd><a href="../../../../../org/apache/calcite/rel/hint/HintStrategyTable.html" title="org.apache.calcite.rel.hint中的类"><code>HintStrategyTable</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>方法概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释">
<caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">实例方法</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">限定符和类型</th>
<th class="colLast" scope="col">方法和说明</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/hint/HintPredicate.html#apply-org.apache.calcite.rel.hint.RelHint-org.apache.calcite.rel.RelNode-">apply</a></span>(<a href="../../../../../org/apache/calcite/rel/hint/RelHint.html" title="org.apache.calcite.rel.hint中的类">RelHint</a>&nbsp;hint,
<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;rel)</code>
<div class="block">Decides if the given <code>hint</code> can be applied to
the relational expression <code>rel</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>方法详细资料</h3>
<a name="apply-org.apache.calcite.rel.hint.RelHint-org.apache.calcite.rel.RelNode-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>apply</h4>
<pre>boolean&nbsp;apply(<a href="../../../../../org/apache/calcite/rel/hint/RelHint.html" title="org.apache.calcite.rel.hint中的类">RelHint</a>&nbsp;hint,
<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;rel)</pre>
<div class="block">Decides if the given <code>hint</code> can be applied to
the relational expression <code>rel</code>.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>hint</code> - The hint</dd>
<dd><code>rel</code> - The relational expression</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>True if the <code>hint</code> can be applied to the <code>rel</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../../../overview-summary.html">概览</a></li>
<li><a href="package-summary.html">程序包</a></li>
<li class="navBarCell1Rev"></li>
<li><a href="package-tree.html"></a></li>
<li><a href="../../../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../../../index-all.html">索引</a></li>
<li><a href="../../../../../help-doc.html">帮助</a></li>
</ul>
<div class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/calcite/rel/hint/HintOptionChecker.html" title="org.apache.calcite.rel.hint中的接口"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../../org/apache/calcite/rel/hint/HintPredicates.html" title="org.apache.calcite.rel.hint中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/calcite/rel/hint/HintPredicate.html" target="_top">框架</a></li>
<li><a href="HintPredicate.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">所有类</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>概要:&nbsp;</li>
<li>嵌套&nbsp;|&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.detail">方法</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &copy; 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>