blob: 6a096c687bf8bb73172fd8e4e0b98ac6941be4a8 [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>SubstitutionVisitor (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="SubstitutionVisitor (Apache Calcite calcite API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":10,"i3":10,"i4":10,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9};
var tabs = {65535:["t0","所有方法"],1:["t1","静态方法"],2:["t2","实例方法"],8:["t4","具体方法"]};
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/plan/Strong.Policy.html" title="org.apache.calcite.plan中的枚举"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.AbstractUnifyRule.html" title="org.apache.calcite.plan中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/plan/SubstitutionVisitor.html" target="_top">框架</a></li>
<li><a href="SubstitutionVisitor.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><a href="#nested.class.summary">嵌套</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">字段</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">构造器</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li><a href="#field.detail">字段</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">构造器</a>&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.plan</div>
<h2 title="类 SubstitutionVisitor" class="title">类 SubstitutionVisitor</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="java.lang中的类或接口">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.plan.SubstitutionVisitor</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>直接已知子类:</dt>
<dd><a href="../../../../org/apache/calcite/plan/MaterializedViewSubstitutionVisitor.html" title="org.apache.calcite.plan中的类">MaterializedViewSubstitutionVisitor</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">SubstitutionVisitor</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="java.lang中的类或接口">Object</a></pre>
<div class="block">Substitutes part of a tree of relational expressions with another tree.
<p>The call <code>new SubstitutionVisitor(target, query).go(replacement))</code>
will return <code>query</code> with every occurrence of <code>target</code> replaced
by <code>replacement</code>.</p>
<p>The following example shows how <code>SubstitutionVisitor</code> can be used
for materialized view recognition.</p>
<ul>
<li>query = SELECT a, c FROM t WHERE x = 5 AND b = 4</li>
<li>target = SELECT a, b, c FROM t WHERE x = 5</li>
<li>replacement = SELECT * FROM mv</li>
<li>result = SELECT a, c FROM mv WHERE b = 4</li>
</ul>
<p>Note that <code>result</code> uses the materialized view table <code>mv</code> and a
simplified condition <code>b = 4</code>.</p>
<p>Uses a bottom-up matching algorithm. Nodes do not need to be identical.
At each level, returns the residue.</p>
<p>The inputs must only include the core relational operators:
<a href="../../../../org/apache/calcite/rel/core/TableScan.html" title="org.apache.calcite.rel.core中的类"><code>TableScan</code></a>,
<a href="../../../../org/apache/calcite/rel/core/Filter.html" title="org.apache.calcite.rel.core中的类"><code>Filter</code></a>,
<a href="../../../../org/apache/calcite/rel/core/Project.html" title="org.apache.calcite.rel.core中的类"><code>Project</code></a>,
<a href="../../../../org/apache/calcite/rel/core/Join.html" title="org.apache.calcite.rel.core中的类"><code>Join</code></a>,
<a href="../../../../org/apache/calcite/rel/core/Union.html" title="org.apache.calcite.rel.core中的类"><code>Union</code></a>,
<a href="../../../../org/apache/calcite/rel/core/Aggregate.html" title="org.apache.calcite.rel.core中的类"><code>Aggregate</code></a>.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>嵌套类概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="嵌套类概要表, 列表嵌套类和解释">
<caption><span>嵌套类</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">限定符和类型</th>
<th class="colLast" scope="col">类和说明</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.AbstractUnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.AbstractUnifyRule</a></span></code>
<div class="block">Abstract base class for implementing <a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类"><code>SubstitutionVisitor.UnifyRule</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.MatchFailed.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.MatchFailed</a></span></code>
<div class="block">Exception thrown to exit a matcher.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.Operand.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.Operand</a></span></code>
<div class="block">Operand to a <a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类"><code>SubstitutionVisitor.UnifyRule</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyResult.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyResult</a></span></code>
<div class="block">Result of an application of a <a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类"><code>SubstitutionVisitor.UnifyRule</code></a> indicating that the
rule successfully matched <code>query</code> against <code>target</code> and
generated a <code>result</code> that is equivalent to <code>query</code> and
contains <code>target</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a></span></code>
<div class="block">Rule that attempts to match a query relational expression
against a target relational expression.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRuleCall.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRuleCall</a></span></code>
<div class="block">Arguments to an application of a <a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类"><code>SubstitutionVisitor.UnifyRule</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>字段概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="字段概要表, 列表字段和解释">
<caption><span>字段</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">限定符和类型</th>
<th class="colLast" scope="col">字段和说明</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#DEFAULT_RULES">DEFAULT_RULES</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/calcite/tools/RelBuilder.html" title="org.apache.calcite.tools中的类">RelBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#relBuilder">relBuilder</a></span></code>
<div class="block">Factory for a builder for relational expressions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#slots">slots</a></span></code>
<div class="block">Workspace while rule is being matched.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>构造器概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="构造器概要表, 列表构造器和解释">
<caption><span>构造器</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">构造器和说明</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-">SubstitutionVisitor</a></span>(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_)</code>
<div class="block">Creates a SubstitutionVisitor with the default rule set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-com.google.common.collect.ImmutableList-">SubstitutionVisitor</a></span>(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_,
com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt;&nbsp;rules)</code>
<div class="block">Creates a SubstitutionVisitor with the default logical builder.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-com.google.common.collect.ImmutableList-org.apache.calcite.tools.RelBuilderFactory-">SubstitutionVisitor</a></span>(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_,
com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt;&nbsp;rules,
<a href="../../../../org/apache/calcite/tools/RelBuilderFactory.html" title="org.apache.calcite.tools中的接口">RelBuilderFactory</a>&nbsp;relBuilderFactory)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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="t1" class="tableTab"><span><a href="javascript:show(1);">静态方法</a></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="t4" class="tableTab"><span><a href="javascript:show(8);">具体方法</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>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#equalType-java.lang.String-org.apache.calcite.rel.mutable.MutableRel-java.lang.String-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.util.Litmus-">equalType</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;desc0,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel0,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;desc1,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel1,
<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus)</code>
<div class="block">Returns whether two relational expressions have the same row-type.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/sql/SqlAggFunction.html" title="org.apache.calcite.sql中的类">SqlAggFunction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#getRollup-org.apache.calcite.sql.SqlAggFunction-">getRollup</a></span>(<a href="../../../../org/apache/calcite/sql/SqlAggFunction.html" title="org.apache.calcite.sql中的类">SqlAggFunction</a>&nbsp;aggregation)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#go-org.apache.calcite.rel.RelNode-">go</a></span>(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;replacement_)</code>
<div class="block">Returns a list of all possible rels that result from substituting the
matched RelNode with the replacement RelNode within the query.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#go0-org.apache.calcite.rel.RelNode-">go0</a></span>(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;replacement_)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#isWeaker-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-">isWeaker</a></span>(<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel0,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel)</code>
<div class="block">Returns if one rel is weaker than another.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#mayBeSatisfiable-org.apache.calcite.rex.RexNode-">mayBeSatisfiable</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;e)</code>
<div class="block">Returns whether a boolean expression ever returns true.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#permute-org.apache.calcite.rel.mutable.MutableAggregate-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.util.mapping.Mapping-">permute</a></span>(<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;aggregate,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;input,
<a href="../../../../org/apache/calcite/util/mapping/Mapping.html" title="org.apache.calcite.util.mapping中的接口">Mapping</a>&nbsp;mapping)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static org.apache.calcite.plan.SubstitutionVisitor.Replacement</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#replace-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-">replace</a></span>(<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;query,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;find,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;replace)</code>
<div class="block">Within a relational expression <code>query</code>, replaces occurrences of
<code>find</code> with <code>replace</code>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#splitFilter-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-">splitFilter</a></span>(<a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="org.apache.calcite.rex中的类">RexSimplify</a>&nbsp;simplify,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;condition,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;target)</code>
<div class="block">Maps a condition onto a target.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.html#unifyAggregates-org.apache.calcite.rel.mutable.MutableAggregate-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.mutable.MutableAggregate-">unifyAggregates</a></span>(<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;query,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;targetCond,
<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;target)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>从类继承的方法&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="java.lang中的类或接口">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="java.lang中的类或接口">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="java.lang中的类或接口">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="java.lang中的类或接口">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="java.lang中的类或接口">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="java.lang中的类或接口">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="java.lang中的类或接口">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="java.lang中的类或接口">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="java.lang中的类或接口">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="java.lang中的类或接口">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="java.lang中的类或接口">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="java.lang中的类或接口">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>字段详细资料</h3>
<a name="DEFAULT_RULES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_RULES</h4>
<pre>protected static final&nbsp;com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt; DEFAULT_RULES</pre>
</li>
</ul>
<a name="relBuilder">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>relBuilder</h4>
<pre>protected final&nbsp;<a href="../../../../org/apache/calcite/tools/RelBuilder.html" title="org.apache.calcite.tools中的类">RelBuilder</a> relBuilder</pre>
<div class="block">Factory for a builder for relational expressions.</div>
</li>
</ul>
<a name="slots">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>slots</h4>
<pre>protected final&nbsp;<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>[] slots</pre>
<div class="block">Workspace while rule is being matched.
Careful, re-entrant!
Assumes no rule needs more than 2 slots.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>构造器详细资料</h3>
<a name="SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SubstitutionVisitor</h4>
<pre>public&nbsp;SubstitutionVisitor(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_)</pre>
<div class="block">Creates a SubstitutionVisitor with the default rule set.</div>
</li>
</ul>
<a name="SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-com.google.common.collect.ImmutableList-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SubstitutionVisitor</h4>
<pre>public&nbsp;SubstitutionVisitor(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_,
com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt;&nbsp;rules)</pre>
<div class="block">Creates a SubstitutionVisitor with the default logical builder.</div>
</li>
</ul>
<a name="SubstitutionVisitor-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-com.google.common.collect.ImmutableList-org.apache.calcite.tools.RelBuilderFactory-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SubstitutionVisitor</h4>
<pre>public&nbsp;SubstitutionVisitor(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;target_,
<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;query_,
com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.UnifyRule.html" title="org.apache.calcite.plan中的类">SubstitutionVisitor.UnifyRule</a>&gt;&nbsp;rules,
<a href="../../../../org/apache/calcite/tools/RelBuilderFactory.html" title="org.apache.calcite.tools中的接口">RelBuilderFactory</a>&nbsp;relBuilderFactory)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>方法详细资料</h3>
<a name="splitFilter-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>splitFilter</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;splitFilter(<a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="org.apache.calcite.rex中的类">RexSimplify</a>&nbsp;simplify,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;condition,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;target)</pre>
<div class="block">Maps a condition onto a target.
<p>If condition is stronger than target, returns the residue.
If it is equal to target, returns the expression that evaluates to
the constant <code>true</code>. If it is weaker than target, returns
<code>null</code>.</p>
<p>The terms satisfy the relation</p>
<blockquote>
<pre><code> condition = target AND residue</code></pre>
</blockquote>
<p>and <code>residue</code> must be as weak as possible.</p>
<p>Example #1: condition stronger than target</p>
<ul>
<li>condition: x = 1 AND y = 2</li>
<li>target: x = 1</li>
<li>residue: y = 2</li>
</ul>
<p>Note that residue <code>x &amp;gt; 0 AND y = 2</code> would also satisfy the
relation <code>condition = target AND residue</code> but is stronger than
necessary, so we prefer <code>y = 2</code>.</p>
<p>Example #2: target weaker than condition (valid, but not currently
implemented)</p>
<ul>
<li>condition: x = 1</li>
<li>target: x = 1 OR z = 3</li>
<li>residue: x = 1</li>
</ul>
<p>Example #3: condition and target are equivalent</p>
<ul>
<li>condition: x = 1 AND y = 2</li>
<li>target: y = 2 AND x = 1</li>
<li>residue: TRUE</li>
</ul>
<p>Example #4: condition weaker than target</p>
<ul>
<li>condition: x = 1</li>
<li>target: x = 1 AND y = 2</li>
<li>residue: null (i.e. no match)</li>
</ul>
<p>There are many other possible examples. It amounts to solving
whether <code>condition AND NOT target</code> can ever evaluate to
true, and therefore is a form of the NP-complete
<a href="http://en.wikipedia.org/wiki/Satisfiability">Satisfiability</a>
problem.</p></div>
</li>
</ul>
<a name="mayBeSatisfiable-org.apache.calcite.rex.RexNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mayBeSatisfiable</h4>
<pre>public static&nbsp;boolean&nbsp;mayBeSatisfiable(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;e)</pre>
<div class="block">Returns whether a boolean expression ever returns true.
<p>This method may give false positives. For instance, it will say
that <code>x = 5 AND x &gt; 10</code> is satisfiable, because at present it
cannot prove that it is not.</p></div>
</li>
</ul>
<a name="go0-org.apache.calcite.rel.RelNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>go0</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;go0(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;replacement_)</pre>
</li>
</ul>
<a name="go-org.apache.calcite.rel.RelNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>go</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&gt;&nbsp;go(<a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口">RelNode</a>&nbsp;replacement_)</pre>
<div class="block">Returns a list of all possible rels that result from substituting the
matched RelNode with the replacement RelNode within the query.
<p>For example, the substitution result of A join B, while A and B
are both a qualified match for replacement R, is R join B, R join R,
A join R.</div>
</li>
</ul>
<a name="replace-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replace</h4>
<pre>public static&nbsp;org.apache.calcite.plan.SubstitutionVisitor.Replacement&nbsp;replace(<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;query,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;find,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;replace)</pre>
<div class="block">Within a relational expression <code>query</code>, replaces occurrences of
<code>find</code> with <code>replace</code>.
<p>Assumes relational expressions (and their descendants) are not null.
Does not handle cycles.</div>
</li>
</ul>
<a name="permute-org.apache.calcite.rel.mutable.MutableAggregate-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.util.mapping.Mapping-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>permute</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;permute(<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;aggregate,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;input,
<a href="../../../../org/apache/calcite/util/mapping/Mapping.html" title="org.apache.calcite.util.mapping中的接口">Mapping</a>&nbsp;mapping)</pre>
</li>
</ul>
<a name="unifyAggregates-org.apache.calcite.rel.mutable.MutableAggregate-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.mutable.MutableAggregate-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unifyAggregates</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;unifyAggregates(<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;query,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;targetCond,
<a href="../../../../org/apache/calcite/rel/mutable/MutableAggregate.html" title="org.apache.calcite.rel.mutable中的类">MutableAggregate</a>&nbsp;target)</pre>
</li>
</ul>
<a name="getRollup-org.apache.calcite.sql.SqlAggFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRollup</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/sql/SqlAggFunction.html" title="org.apache.calcite.sql中的类">SqlAggFunction</a>&nbsp;getRollup(<a href="../../../../org/apache/calcite/sql/SqlAggFunction.html" title="org.apache.calcite.sql中的类">SqlAggFunction</a>&nbsp;aggregation)</pre>
</li>
</ul>
<a name="isWeaker-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.rel.mutable.MutableRel-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWeaker</h4>
<pre>protected&nbsp;boolean&nbsp;isWeaker(<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel0,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel)</pre>
<div class="block">Returns if one rel is weaker than another.</div>
</li>
</ul>
<a name="equalType-java.lang.String-org.apache.calcite.rel.mutable.MutableRel-java.lang.String-org.apache.calcite.rel.mutable.MutableRel-org.apache.calcite.util.Litmus-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equalType</h4>
<pre>public static&nbsp;boolean&nbsp;equalType(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;desc0,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel0,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;desc1,
<a href="../../../../org/apache/calcite/rel/mutable/MutableRel.html" title="org.apache.calcite.rel.mutable中的类">MutableRel</a>&nbsp;rel1,
<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus)</pre>
<div class="block">Returns whether two relational expressions have the same row-type.</div>
</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/plan/Strong.Policy.html" title="org.apache.calcite.plan中的枚举"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../org/apache/calcite/plan/SubstitutionVisitor.AbstractUnifyRule.html" title="org.apache.calcite.plan中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/plan/SubstitutionVisitor.html" target="_top">框架</a></li>
<li><a href="SubstitutionVisitor.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><a href="#nested.class.summary">嵌套</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">字段</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">构造器</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li><a href="#field.detail">字段</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">构造器</a>&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>