blob: 0e9e56ed1e82f394d61b76b07138d892d2285d51 [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>RexProgram (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="RexProgram (Apache Calcite calcite API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":42,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10};
var tabs = {65535:["t0","所有方法"],1:["t1","静态方法"],2:["t2","实例方法"],8:["t4","具体方法"],32:["t6","已过时的方法"]};
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/rex/RexPermuteInputsShuttle.html" title="org.apache.calcite.rex中的类"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="org.apache.calcite.rex中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/rex/RexProgram.html" target="_top">框架</a></li>
<li><a href="RexProgram.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><a href="#constructor.summary">构造器</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&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.rex</div>
<h2 title="类 RexProgram" class="title">类 RexProgram</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.rex.RexProgram</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">RexProgram</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">A collection of expressions which read inputs, compute output expressions,
and optionally use a condition to filter rows.
<p>Programs are immutable. It may help to use a <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="org.apache.calcite.rex中的类"><code>RexProgramBuilder</code></a>,
which has the same relationship to <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类"><code>RexProgram</code></a> as <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="java.lang中的类或接口"><code>StringBuilder</code></a>
has to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口"><code>String</code></a>.
<p>A program can contain aggregate functions. If it does, the arguments to
each aggregate function must be an <a href="../../../../org/apache/calcite/rex/RexInputRef.html" title="org.apache.calcite.rex中的类"><code>RexInputRef</code></a>.</div>
<dl>
<dt><span class="seeLabel">另请参阅:</span></dt>
<dd><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="org.apache.calcite.rex中的类"><code>RexProgramBuilder</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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/rex/RexProgram.html#RexProgram-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexLocalRef-org.apache.calcite.rel.type.RelDataType-">RexProgram</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;exprs,
<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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;&nbsp;projects,
<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&nbsp;condition,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType)</code>
<div class="block">Creates a program.</div>
</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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">已过时的方法</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><a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#collectExplainTerms-java.lang.String-org.apache.calcite.rel.RelWriter-">collectExplainTerms</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;prefix,
<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#collectExplainTerms-java.lang.String-org.apache.calcite.rel.RelWriter-org.apache.calcite.sql.SqlExplainLevel-">collectExplainTerms</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;prefix,
<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw,
<a href="../../../../org/apache/calcite/sql/SqlExplainLevel.html" title="org.apache.calcite.sql中的枚举">SqlExplainLevel</a>&nbsp;level)</code>
<div class="block">Collects the expressions in this program into a list of terms and values.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#containsAggs--">containsAggs</a></span>()</code>
<div class="block">Returns whether this program contains windowed aggregate functions</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#create-org.apache.calcite.rel.type.RelDataType-java.util.List-org.apache.calcite.rex.RexNode-java.util.List-org.apache.calcite.rex.RexBuilder-">create</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;projectExprs,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;conditionExpr,
<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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;&nbsp;fieldNames,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</code>
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#create-org.apache.calcite.rel.type.RelDataType-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexBuilder-">create</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;projectExprs,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;conditionExpr,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</code>
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#create-org.apache.calcite.rel.RelInput-">create</a></span>(<a href="../../../../org/apache/calcite/rel/RelInput.html" title="org.apache.calcite.rel中的接口">RelInput</a>&nbsp;input)</code>
<div class="block">Create a program from serialized output.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#createIdentity-org.apache.calcite.rel.type.RelDataType-">createIdentity</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;rowType)</code>
<div class="block">Creates the identity program.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#createIdentity-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rel.type.RelDataType-">createIdentity</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;rowType,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType)</code>
<div class="block">Creates a program that projects its input fields but with possibly
different names for the output fields.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#deduceCollations-java.util.List-int-java.util.List-java.util.List-">deduceCollations</a></span>(<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;outputCollations,
int&nbsp;sourceCount,
<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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;&nbsp;refs,
<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;inputCollations)</code>
<div class="block">Given a list of expressions and a description of which are ordered,
populates a list of collations, sorted in natural order.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><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/rex/RexProgram.html#expandLocalRef-org.apache.calcite.rex.RexLocalRef-">expandLocalRef</a></span>(<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&nbsp;ref)</code>
<div class="block">Fully expands a RexLocalRef back into a pure RexNode tree containing no
RexLocalRefs (reversing the effect of common subexpression elimination).</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#explainCalc-org.apache.calcite.rel.RelWriter-">explainCalc</a></span>(<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw)</code>
<div class="block">Writes an explanation of the expressions in this program to a plan
writer.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><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/rex/RexProgram.html#gatherExpr-org.apache.calcite.rex.RexNode-">gatherExpr</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;expr)</code>&nbsp;</td>
</tr>
<tr id="i12" 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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getCollations-java.util.List-">getCollations</a></span>(<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;inputCollations)</code>
<div class="block">Given a list of collations which hold for the input to this program,
returns a list of collations which hold for its output.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getCondition--">getCondition</a></span>()</code>
<div class="block">Returns the field reference of this program's filter condition, or null
if there is no condition.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="java.util中的类或接口">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getCorrelVariableNames--">getCorrelVariableNames</a></span>()</code>
<div class="block">Returns the set of correlation variables used (read) by this program.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getExprCount--">getExprCount</a></span>()</code>
<div class="block">Returns the number of expressions in this program.</div>
</td>
</tr>
<tr id="i16" 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/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getExprList--">getExprList</a></span>()</code>
<div class="block">Returns the common sub-expressions of this program.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getInputRowType--">getInputRowType</a></span>()</code>
<div class="block">Returns the type of the input row to the program.</div>
</td>
</tr>
<tr id="i18" 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/util/Pair.html" title="org.apache.calcite.util中的类">Pair</a>&lt;<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getNamedProjects--">getNamedProjects</a></span>()</code>
<div class="block">Returns a list of project expressions and their field names.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getOutputRowType--">getOutputRowType</a></span>()</code>
<div class="block">Returns the type of the output row from this program.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/util/mapping/Mappings.TargetMapping.html" title="org.apache.calcite.util.mapping中的接口">Mappings.TargetMapping</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getPartialMapping-int-">getPartialMapping</a></span>(int&nbsp;inputFieldCount)</code>
<div class="block">Returns a partial mapping of a set of project expressions.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/util/Permutation.html" title="org.apache.calcite.util中的类">Permutation</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getPermutation--">getPermutation</a></span>()</code>
<div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div>
</td>
</tr>
<tr id="i22" 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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getProjectList--">getProjectList</a></span>()</code>
<div class="block">Returns an array of references to the expressions which this program is
to project.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getReferenceCounts--">getReferenceCounts</a></span>()</code>
<div class="block">Gets reference counts for each expression in the program, where the
references are detected from later expressions in the same program, as
well as the project list and condition.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#getSourceField-int-">getSourceField</a></span>(int&nbsp;outputOrdinal)</code>
<div class="block">Returns the input field that an output field is populated from, or -1 if
it is populated from an expression.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isConstant-org.apache.calcite.rex.RexNode-">isConstant</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;ref)</code>
<div class="block">Returns whether an expression is constant.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isNormalized-org.apache.calcite.util.Litmus-org.apache.calcite.rex.RexBuilder-">isNormalized</a></span>(<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</code>
<div class="block">Returns whether this program is in canonical form.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isNull-org.apache.calcite.rex.RexNode-">isNull</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;expr)</code>
<div class="block">Returns whether an expression always evaluates to null.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isPermutation--">isPermutation</a></span>()</code>
<div class="block">Returns whether this program is a permutation of its inputs.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isTrivial--">isTrivial</a></span>()</code>
<div class="block">Returns whether this program returns its input exactly.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#isValid-org.apache.calcite.util.Litmus-org.apache.calcite.rel.RelNode.Context-">isValid</a></span>(<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus,
<a href="../../../../org/apache/calcite/rel/RelNode.Context.html" title="org.apache.calcite.rel中的接口">RelNode.Context</a>&nbsp;context)</code>
<div class="block">Checks that this program is valid.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#normalize-org.apache.calcite.rex.RexBuilder-boolean-">normalize</a></span>(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder,
boolean&nbsp;simplify)</code>
<div class="block"><span class="deprecatedLabel">已过时。</span>&nbsp;</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#normalize-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-">normalize</a></span>(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder,
<a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="org.apache.calcite.rex中的类">RexSimplify</a>&nbsp;simplify)</code>
<div class="block">Creates a simplified/normalized copy of this program.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#projectsIdentity-boolean-">projectsIdentity</a></span>(boolean&nbsp;fail)</code>
<div class="block">Returns whether the fields on the leading edge of the project list are
the input fields.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#projectsOnlyIdentity--">projectsOnlyIdentity</a></span>()</code>
<div class="block">Returns whether this program projects precisely its input fields.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/calcite/util/Pair.html" title="org.apache.calcite.util中的类">Pair</a>&lt;com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;,com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#split--">split</a></span>()</code>
<div class="block">Splits this program into a list of project expressions and a list of
filter expressions.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgram.html#toString--">toString</a></span>()</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#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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>构造器详细资料</h3>
<a name="RexProgram-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexLocalRef-org.apache.calcite.rel.type.RelDataType-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RexProgram</h4>
<pre>public&nbsp;RexProgram(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;exprs,
<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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;&nbsp;projects,
<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&nbsp;condition,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType)</pre>
<div class="block">Creates a program.
<p>The expressions must be valid: they must not contain common expressions,
forward references, or non-trivial aggregates.</p></div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>inputRowType</code> - Input row type</dd>
<dd><code>exprs</code> - Common expressions</dd>
<dd><code>projects</code> - Projection expressions</dd>
<dd><code>condition</code> - Condition expression. If null, calculator does not
filter rows</dd>
<dd><code>outputRowType</code> - Description of the row produced by the program</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>方法详细资料</h3>
<a name="getExprList--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExprList</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/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;getExprList()</pre>
<div class="block">Returns the common sub-expressions of this program.
<p>The list is never null but may be empty; each the expression in the
list is not null; and no further reduction into smaller common
sub-expressions is possible.</div>
</li>
</ul>
<a name="getProjectList--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProjectList</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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;&nbsp;getProjectList()</pre>
<div class="block">Returns an array of references to the expressions which this program is
to project. Never null, may be empty.</div>
</li>
</ul>
<a name="getNamedProjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNamedProjects</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/util/Pair.html" title="org.apache.calcite.util中的类">Pair</a>&lt;<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;&gt;&nbsp;getNamedProjects()</pre>
<div class="block">Returns a list of project expressions and their field names.</div>
</li>
</ul>
<a name="getCondition--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCondition</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&nbsp;getCondition()</pre>
<div class="block">Returns the field reference of this program's filter condition, or null
if there is no condition.</div>
</li>
</ul>
<a name="create-org.apache.calcite.rel.type.RelDataType-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexBuilder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;create(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;projectExprs,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;conditionExpr,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</pre>
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition. Does not attempt to eliminate common sub-expressions.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>projectExprs</code> - Project expressions</dd>
<dd><code>conditionExpr</code> - Condition on which to filter rows, or null if rows
are not to be filtered</dd>
<dd><code>outputRowType</code> - Output row type</dd>
<dd><code>rexBuilder</code> - Builder of rex expressions</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A program</dd>
</dl>
</li>
</ul>
<a name="create-org.apache.calcite.rel.type.RelDataType-java.util.List-org.apache.calcite.rex.RexNode-java.util.List-org.apache.calcite.rex.RexBuilder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;create(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="java.util中的类或接口">List</a>&lt;? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&nbsp;projectExprs,
<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;conditionExpr,
<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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;&nbsp;fieldNames,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</pre>
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition. Does not attempt to eliminate common sub-expressions.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>projectExprs</code> - Project expressions</dd>
<dd><code>conditionExpr</code> - Condition on which to filter rows, or null if rows
are not to be filtered</dd>
<dd><code>fieldNames</code> - Names of projected fields</dd>
<dd><code>rexBuilder</code> - Builder of rex expressions</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A program</dd>
</dl>
</li>
</ul>
<a name="create-org.apache.calcite.rel.RelInput-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;create(<a href="../../../../org/apache/calcite/rel/RelInput.html" title="org.apache.calcite.rel中的接口">RelInput</a>&nbsp;input)</pre>
<div class="block">Create a program from serialized output.
In this case, the input is mainly from the output json string of <a href="../../../../org/apache/calcite/rel/externalize/RelJsonWriter.html" title="org.apache.calcite.rel.externalize中的类"><code>RelJsonWriter</code></a></div>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">覆盖:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="java.lang中的类或接口">toString</a></code>&nbsp;在类中&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="java.lang中的类或接口">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="explainCalc-org.apache.calcite.rel.RelWriter-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>explainCalc</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;explainCalc(<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw)</pre>
<div class="block">Writes an explanation of the expressions in this program to a plan
writer.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>pw</code> - Plan writer</dd>
</dl>
</li>
</ul>
<a name="collectExplainTerms-java.lang.String-org.apache.calcite.rel.RelWriter-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collectExplainTerms</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;collectExplainTerms(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;prefix,
<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw)</pre>
</li>
</ul>
<a name="collectExplainTerms-java.lang.String-org.apache.calcite.rel.RelWriter-org.apache.calcite.sql.SqlExplainLevel-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collectExplainTerms</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;collectExplainTerms(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&nbsp;prefix,
<a href="../../../../org/apache/calcite/rel/RelWriter.html" title="org.apache.calcite.rel中的接口">RelWriter</a>&nbsp;pw,
<a href="../../../../org/apache/calcite/sql/SqlExplainLevel.html" title="org.apache.calcite.sql中的枚举">SqlExplainLevel</a>&nbsp;level)</pre>
<div class="block">Collects the expressions in this program into a list of terms and values.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>prefix</code> - Prefix for term names, usually the empty string, but useful
if a relational expression contains more than one program</dd>
<dd><code>pw</code> - Plan writer</dd>
</dl>
</li>
</ul>
<a name="getExprCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExprCount</h4>
<pre>public&nbsp;int&nbsp;getExprCount()</pre>
<div class="block">Returns the number of expressions in this program.</div>
</li>
</ul>
<a name="createIdentity-org.apache.calcite.rel.type.RelDataType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIdentity</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;createIdentity(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;rowType)</pre>
<div class="block">Creates the identity program.</div>
</li>
</ul>
<a name="createIdentity-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rel.type.RelDataType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIdentity</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;createIdentity(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;rowType,
<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;outputRowType)</pre>
<div class="block">Creates a program that projects its input fields but with possibly
different names for the output fields.</div>
</li>
</ul>
<a name="getInputRowType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputRowType</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;getInputRowType()</pre>
<div class="block">Returns the type of the input row to the program.</div>
<dl>
<dt><span class="returnLabel">返回:</span></dt>
<dd>input row type</dd>
</dl>
</li>
</ul>
<a name="containsAggs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsAggs</h4>
<pre>public&nbsp;boolean&nbsp;containsAggs()</pre>
<div class="block">Returns whether this program contains windowed aggregate functions</div>
<dl>
<dt><span class="returnLabel">返回:</span></dt>
<dd>whether this program contains windowed aggregate functions</dd>
</dl>
</li>
</ul>
<a name="getOutputRowType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOutputRowType</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="org.apache.calcite.rel.type中的接口">RelDataType</a>&nbsp;getOutputRowType()</pre>
<div class="block">Returns the type of the output row from this program.</div>
<dl>
<dt><span class="returnLabel">返回:</span></dt>
<dd>output row type</dd>
</dl>
</li>
</ul>
<a name="isValid-org.apache.calcite.util.Litmus-org.apache.calcite.rel.RelNode.Context-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isValid</h4>
<pre>public&nbsp;boolean&nbsp;isValid(<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus,
<a href="../../../../org/apache/calcite/rel/RelNode.Context.html" title="org.apache.calcite.rel中的接口">RelNode.Context</a>&nbsp;context)</pre>
<div class="block">Checks that this program is valid.
<p>If <code>fail</code> is true, executes <code>assert false</code>, so
will throw an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="java.lang中的类或接口"><code>AssertionError</code></a> if assertions are enabled. If <code>
fail</code> is false, merely returns whether the program is valid.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>litmus</code> - What to do if an error is detected</dd>
<dd><code>context</code> - Context of enclosing <a href="../../../../org/apache/calcite/rel/RelNode.html" title="org.apache.calcite.rel中的接口"><code>RelNode</code></a>, for validity checking,
or null if not known</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>Whether the program is valid</dd>
</dl>
</li>
</ul>
<a name="isNull-org.apache.calcite.rex.RexNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNull</h4>
<pre>public&nbsp;boolean&nbsp;isNull(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;expr)</pre>
<div class="block">Returns whether an expression always evaluates to null.
<p>Like <a href="../../../../org/apache/calcite/rex/RexUtil.html#isNull-org.apache.calcite.rex.RexNode-"><code>RexUtil.isNull(RexNode)</code></a>, null literals are null, and
casts of null literals are null. But this method also regards references
to null expressions as null.</p></div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>expr</code> - Expression</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>Whether expression always evaluates to null</dd>
</dl>
</li>
</ul>
<a name="expandLocalRef-org.apache.calcite.rex.RexLocalRef-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expandLocalRef</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;expandLocalRef(<a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&nbsp;ref)</pre>
<div class="block">Fully expands a RexLocalRef back into a pure RexNode tree containing no
RexLocalRefs (reversing the effect of common subexpression elimination).
For example, <code>program.expandLocalRef(program.getCondition())</code>
will return the expansion of a program's condition.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>ref</code> - a RexLocalRef from this program</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>expanded form</dd>
</dl>
</li>
</ul>
<a name="split--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/util/Pair.html" title="org.apache.calcite.util中的类">Pair</a>&lt;com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;,com.google.common.collect.ImmutableList&lt;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&gt;&gt;&nbsp;split()</pre>
<div class="block">Splits this program into a list of project expressions and a list of
filter expressions.
<p>Neither list is null.
The filters are evaluated first.</div>
</li>
</ul>
<a name="getCollations-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCollations</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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;getCollations(<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;inputCollations)</pre>
<div class="block">Given a list of collations which hold for the input to this program,
returns a list of collations which hold for its output. The result is
mutable and sorted.</div>
</li>
</ul>
<a name="deduceCollations-java.util.List-int-java.util.List-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deduceCollations</h4>
<pre>public static&nbsp;void&nbsp;deduceCollations(<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;outputCollations,
int&nbsp;sourceCount,
<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/rex/RexLocalRef.html" title="org.apache.calcite.rex中的类">RexLocalRef</a>&gt;&nbsp;refs,
<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/RelCollation.html" title="org.apache.calcite.rel中的接口">RelCollation</a>&gt;&nbsp;inputCollations)</pre>
<div class="block">Given a list of expressions and a description of which are ordered,
populates a list of collations, sorted in natural order.</div>
</li>
</ul>
<a name="projectsIdentity-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>projectsIdentity</h4>
<pre>public&nbsp;boolean&nbsp;projectsIdentity(boolean&nbsp;fail)</pre>
<div class="block">Returns whether the fields on the leading edge of the project list are
the input fields.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>fail</code> - Whether to throw an assert failure if does not project
identity</dd>
</dl>
</li>
</ul>
<a name="projectsOnlyIdentity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>projectsOnlyIdentity</h4>
<pre>public&nbsp;boolean&nbsp;projectsOnlyIdentity()</pre>
<div class="block">Returns whether this program projects precisely its input fields. It may
or may not apply a condition.</div>
</li>
</ul>
<a name="isTrivial--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTrivial</h4>
<pre>public&nbsp;boolean&nbsp;isTrivial()</pre>
<div class="block">Returns whether this program returns its input exactly.
<p>This is a stronger condition than <a href="../../../../org/apache/calcite/rex/RexProgram.html#projectsIdentity-boolean-"><code>projectsIdentity(boolean)</code></a>.</div>
</li>
</ul>
<a name="getReferenceCounts--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReferenceCounts</h4>
<pre>public&nbsp;int[]&nbsp;getReferenceCounts()</pre>
<div class="block">Gets reference counts for each expression in the program, where the
references are detected from later expressions in the same program, as
well as the project list and condition. Expressions with references
counts greater than 1 are true common sub-expressions.</div>
<dl>
<dt><span class="returnLabel">返回:</span></dt>
<dd>array of reference counts; the ith element in the returned array
is the number of references to getExprList()[i]</dd>
</dl>
</li>
</ul>
<a name="isConstant-org.apache.calcite.rex.RexNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConstant</h4>
<pre>public&nbsp;boolean&nbsp;isConstant(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;ref)</pre>
<div class="block">Returns whether an expression is constant.</div>
</li>
</ul>
<a name="gatherExpr-org.apache.calcite.rex.RexNode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>gatherExpr</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;gatherExpr(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="org.apache.calcite.rex中的类">RexNode</a>&nbsp;expr)</pre>
</li>
</ul>
<a name="getSourceField-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSourceField</h4>
<pre>public&nbsp;int&nbsp;getSourceField(int&nbsp;outputOrdinal)</pre>
<div class="block">Returns the input field that an output field is populated from, or -1 if
it is populated from an expression.</div>
</li>
</ul>
<a name="isPermutation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPermutation</h4>
<pre>public&nbsp;boolean&nbsp;isPermutation()</pre>
<div class="block">Returns whether this program is a permutation of its inputs.</div>
</li>
</ul>
<a name="getPermutation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPermutation</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/util/Permutation.html" title="org.apache.calcite.util中的类">Permutation</a>&nbsp;getPermutation()</pre>
<div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div>
</li>
</ul>
<a name="getCorrelVariableNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCorrelVariableNames</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="java.util中的类或接口">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a>&gt;&nbsp;getCorrelVariableNames()</pre>
<div class="block">Returns the set of correlation variables used (read) by this program.</div>
<dl>
<dt><span class="returnLabel">返回:</span></dt>
<dd>set of correlation variable names</dd>
</dl>
</li>
</ul>
<a name="isNormalized-org.apache.calcite.util.Litmus-org.apache.calcite.rex.RexBuilder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNormalized</h4>
<pre>public&nbsp;boolean&nbsp;isNormalized(<a href="../../../../org/apache/calcite/util/Litmus.html" title="org.apache.calcite.util中的接口">Litmus</a>&nbsp;litmus,
<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder)</pre>
<div class="block">Returns whether this program is in canonical form.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>litmus</code> - What to do if an error is detected (program is not in
canonical form)</dd>
<dd><code>rexBuilder</code> - Rex builder</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>whether in canonical form</dd>
</dl>
</li>
</ul>
<a name="normalize-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalize</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;normalize(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder,
<a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="org.apache.calcite.rex中的类">RexSimplify</a>&nbsp;simplify)</pre>
<div class="block">Creates a simplified/normalized copy of this program.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>rexBuilder</code> - Rex builder</dd>
<dd><code>simplify</code> - Simplifier to simplify (in addition to normalizing),
or null to not simplify</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>Normalized program</dd>
</dl>
</li>
</ul>
<a name="normalize-org.apache.calcite.rex.RexBuilder-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalize</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="java.lang中的类或接口">@Deprecated</a>
public&nbsp;<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="org.apache.calcite.rex中的类">RexProgram</a>&nbsp;normalize(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="org.apache.calcite.rex中的类">RexBuilder</a>&nbsp;rexBuilder,
boolean&nbsp;simplify)</pre>
<div class="block"><span class="deprecatedLabel">已过时。</span>&nbsp;</div>
</li>
</ul>
<a name="getPartialMapping-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPartialMapping</h4>
<pre>public&nbsp;<a href="../../../../org/apache/calcite/util/mapping/Mappings.TargetMapping.html" title="org.apache.calcite.util.mapping中的接口">Mappings.TargetMapping</a>&nbsp;getPartialMapping(int&nbsp;inputFieldCount)</pre>
<div class="block">Returns a partial mapping of a set of project expressions.
<p>The mapping is an inverse function.
Every target has a source field, but
a source might have 0, 1 or more targets.
Project expressions that do not consist of
a mapping are ignored.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>inputFieldCount</code> - Number of input fields</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>Mapping of a set of project expressions, never null</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/rex/RexPermuteInputsShuttle.html" title="org.apache.calcite.rex中的类"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="org.apache.calcite.rex中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/rex/RexProgram.html" target="_top">框架</a></li>
<li><a href="RexProgram.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><a href="#constructor.summary">构造器</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&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>