blob: 1b7d42dc051b4df3ea60b73f08a8b4a712be70a5 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>RexProgram (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.rex, class: RexProgram">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rex</a></div>
<h1 title="Class RexProgram" class="title">Class RexProgram</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.calcite.rex.RexProgram</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">RexProgram</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<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="RexProgramBuilder.html" title="class in org.apache.calcite.rex"><code>RexProgramBuilder</code></a>,
which has the same relationship to <a href="RexProgram.html" title="class in org.apache.calcite.rex"><code>RexProgram</code></a> as <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/StringBuilder.html" title="class or interface in java.lang" class="external-link"><code>StringBuilder</code></a>
has to <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><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="RexInputRef.html" title="class in org.apache.calcite.rex"><code>RexInputRef</code></a>.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="RexProgramBuilder.html" title="class in org.apache.calcite.rex"><code>RexProgramBuilder</code></a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataType,java.util.List,java.util.List,org.apache.calcite.rex.RexLocalRef,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">RexProgram</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;exprs,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;&nbsp;projects,
@Nullable <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&nbsp;condition,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a program.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter)" class="member-name-link">collectExplainTerms</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;prefix,
<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter,org.apache.calcite.sql.SqlExplainLevel)" class="member-name-link">collectExplainTerms</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;prefix,
<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw,
<a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a>&nbsp;level)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Collects the expressions in this program into a list of terms and values.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#containsAggs()" class="member-name-link">containsAggs</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this program contains windowed aggregate functions.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(org.apache.calcite.rel.RelInput)" class="member-name-link">create</a><wbr>(<a href="../rel/RelInput.html" title="interface in org.apache.calcite.rel">RelInput</a>&nbsp;input)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Create a program from serialized output.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,java.util.List,org.apache.calcite.rex.RexBuilder)" class="member-name-link">create</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;projectExprs,
@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;conditionExpr,
@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends @Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&nbsp;fieldNames,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#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)" class="member-name-link">create</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;projectExprs,
@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;conditionExpr,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a program which calculates projections and filters rows based
upon a condition.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createIdentity(org.apache.calcite.rel.type.RelDataType)" class="member-name-link">createIdentity</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates the identity program.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createIdentity(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)" class="member-name-link">createIdentity</a><wbr>(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a program that projects its input fields but with possibly
different names for the output fields.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deduceCollations(java.util.List,int,java.util.List,java.util.List)" class="member-name-link">deduceCollations</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;outputCollations,
int&nbsp;sourceCount,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;&nbsp;refs,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;inputCollations)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<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>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#expandList(java.util.List)" class="member-name-link">expandList</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;nodes)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Expands a list of expressions that may contain <a href="RexLocalRef.html" title="class in org.apache.calcite.rex"><code>RexLocalRef</code></a>s.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#expandLocalRef(org.apache.calcite.rex.RexLocalRef)" class="member-name-link">expandLocalRef</a><wbr>(<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&nbsp;ref)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fully expands a RexLocalRef back into a pure RexNode tree containing no
RexLocalRefs (reversing the effect of common subexpression elimination).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#explainCalc(org.apache.calcite.rel.RelWriter)" class="member-name-link">explainCalc</a><wbr>(<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes an explanation of the expressions in this program to a plan
writer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#gatherExpr(org.apache.calcite.rex.RexNode)" class="member-name-link">gatherExpr</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;expr)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCollations(java.util.List)" class="member-name-link">getCollations</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;inputCollations)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCondition()" class="member-name-link">getCondition</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the field reference of this program's filter condition, or null
if there is no condition.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCorrelVariableNames()" class="member-name-link">getCorrelVariableNames</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the set of correlation variables used (read) by this program.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getExprCount()" class="member-name-link">getExprCount</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the number of expressions in this program.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getExprList()" class="member-name-link">getExprList</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the common sub-expressions of this program.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInputRowType()" class="member-name-link">getInputRowType</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the type of the input row to the program.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNamedProjects()" class="member-name-link">getNamedProjects</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a list of project expressions and their field names.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOutputRowType()" class="member-name-link">getOutputRowType</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the type of the output row from this program.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPartialMapping(int)" class="member-name-link">getPartialMapping</a><wbr>(int&nbsp;inputFieldCount)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a partial mapping of a set of project expressions.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@Nullable <a href="../util/Permutation.html" title="class in org.apache.calcite.util">Permutation</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPermutation()" class="member-name-link">getPermutation</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getProjectList()" class="member-name-link">getProjectList</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns an array of references to the expressions which this program is
to project.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getReferenceCounts()" class="member-name-link">getReferenceCounts</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSourceField(int)" class="member-name-link">getSourceField</a><wbr>(int&nbsp;outputOrdinal)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the input field that an output field is populated from, or -1 if
it is populated from an expression.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isConstant(org.apache.calcite.rex.RexNode)" class="member-name-link">isConstant</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;ref)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether an expression is constant.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isNormalized(org.apache.calcite.util.Litmus,org.apache.calcite.rex.RexBuilder)" class="member-name-link">isNormalized</a><wbr>(<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this program is in canonical form.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isNull(org.apache.calcite.rex.RexNode)" class="member-name-link">isNull</a><wbr>(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;expr)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether an expression always evaluates to null.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isPermutation()" class="member-name-link">isPermutation</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this program is a permutation of its inputs.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isTrivial()" class="member-name-link">isTrivial</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this program returns its input exactly.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)" class="member-name-link">isValid</a><wbr>(<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus,
@Nullable <a href="../rel/RelNode.Context.html" title="interface in org.apache.calcite.rel">RelNode.Context</a>&nbsp;context)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks that this program is valid.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#normalize(org.apache.calcite.rex.RexBuilder,boolean)" class="member-name-link">normalize</a><wbr>(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
boolean&nbsp;simplify)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#normalize(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexSimplify)" class="member-name-link">normalize</a><wbr>(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
@Nullable <a href="RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a>&nbsp;simplify)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates a simplified/normalized copy of this program.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#projectsIdentity(boolean)" class="member-name-link">projectsIdentity</a><wbr>(boolean&nbsp;fail)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether the fields on the leading edge of the project list are
the input fields.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#projectsOnlyIdentity()" class="member-name-link">projectsOnlyIdentity</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether this program projects precisely its input fields.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;com.google.common.collect.ImmutableList&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;,<wbr>com.google.common.collect.ImmutableList&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#split()" class="member-name-link">split</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Splits this program into a list of project expressions and a list of
filter expressions.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataType,java.util.List,java.util.List,org.apache.calcite.rex.RexLocalRef,org.apache.calcite.rel.type.RelDataType)">
<h3>RexProgram</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">RexProgram</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;exprs,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;&nbsp;projects,
@Nullable <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&nbsp;condition,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType)</span></div>
<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 class="notes">
<dt>Parameters:</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>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getExprList()">
<h3>getExprList</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</span>&nbsp;<span class="element-name">getExprList</span>()</div>
<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>
</section>
</li>
<li>
<section class="detail" id="getProjectList()">
<h3>getProjectList</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;</span>&nbsp;<span class="element-name">getProjectList</span>()</div>
<div class="block">Returns an array of references to the expressions which this program is
to project. Never null, may be empty.</div>
</section>
</li>
<li>
<section class="detail" id="getNamedProjects()">
<h3>getNamedProjects</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&gt;</span>&nbsp;<span class="element-name">getNamedProjects</span>()</div>
<div class="block">Returns a list of project expressions and their field names.</div>
</section>
</li>
<li>
<section class="detail" id="getCondition()">
<h3>getCondition</h3>
<div class="member-signature"><span class="annotations">@Pure
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></span>&nbsp;<span class="element-name">getCondition</span>()</div>
<div class="block">Returns the field reference of this program's filter condition, or null
if there is no condition.</div>
</section>
</li>
<li>
<section class="detail" id="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)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;projectExprs,
@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;conditionExpr,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>A program</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,java.util.List,org.apache.calcite.rex.RexBuilder)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;inputRowType,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;projectExprs,
@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;conditionExpr,
@Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends @Nullable <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&nbsp;fieldNames,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</span></div>
<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 class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>A program</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="create(org.apache.calcite.rel.RelInput)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(<a href="../rel/RelInput.html" title="interface in org.apache.calcite.rel">RelInput</a>&nbsp;input)</span></div>
<div class="block">Create a program from serialized output.
In this case, the input is mainly from the output json string of <a href="../rel/externalize/RelJsonWriter.html" title="class in org.apache.calcite.rel.externalize"><code>RelJsonWriter</code></a></div>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="explainCalc(org.apache.calcite.rel.RelWriter)">
<h3>explainCalc</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span>&nbsp;<span class="element-name">explainCalc</span><wbr><span class="parameters">(<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw)</span></div>
<div class="block">Writes an explanation of the expressions in this program to a plan
writer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>pw</code> - Plan writer</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter)">
<h3>collectExplainTerms</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span>&nbsp;<span class="element-name">collectExplainTerms</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;prefix,
<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw)</span></div>
</section>
</li>
<li>
<section class="detail" id="collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter,org.apache.calcite.sql.SqlExplainLevel)">
<h3>collectExplainTerms</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span>&nbsp;<span class="element-name">collectExplainTerms</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;prefix,
<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a>&nbsp;pw,
<a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a>&nbsp;level)</span></div>
<div class="block">Collects the expressions in this program into a list of terms and values.</div>
<dl class="notes">
<dt>Parameters:</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>
</section>
</li>
<li>
<section class="detail" id="getExprCount()">
<h3>getExprCount</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getExprCount</span>()</div>
<div class="block">Returns the number of expressions in this program.</div>
</section>
</li>
<li>
<section class="detail" id="createIdentity(org.apache.calcite.rel.type.RelDataType)">
<h3>createIdentity</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">createIdentity</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType)</span></div>
<div class="block">Creates the identity program.</div>
</section>
</li>
<li>
<section class="detail" id="createIdentity(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">
<h3>createIdentity</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">createIdentity</span><wbr><span class="parameters">(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;outputRowType)</span></div>
<div class="block">Creates a program that projects its input fields but with possibly
different names for the output fields.</div>
</section>
</li>
<li>
<section class="detail" id="getInputRowType()">
<h3>getInputRowType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">getInputRowType</span>()</div>
<div class="block">Returns the type of the input row to the program.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>input row type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="containsAggs()">
<h3>containsAggs</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">containsAggs</span>()</div>
<div class="block">Returns whether this program contains windowed aggregate functions.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>whether this program contains windowed aggregate functions</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getOutputRowType()">
<h3>getOutputRowType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span>&nbsp;<span class="element-name">getOutputRowType</span>()</div>
<div class="block">Returns the type of the output row from this program.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>output row type</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)">
<h3>isValid</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isValid</span><wbr><span class="parameters">(@UnknownInitialization RexProgram&nbsp;this,
<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus,
@Nullable <a href="../rel/RelNode.Context.html" title="interface in org.apache.calcite.rel">RelNode.Context</a>&nbsp;context)</span></div>
<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/en/java/javase/17/docs/api/java.base/java/lang/AssertionError.html" title="class or interface in java.lang" class="external-link"><code>AssertionError</code></a> if assertions are enabled. If <code>
fail</code> is false, merely returns whether the program is valid.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>litmus</code> - What to do if an error is detected</dd>
<dd><code>context</code> - Context of enclosing <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a>, for validity checking,
or null if not known</dd>
<dt>Returns:</dt>
<dd>Whether the program is valid</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isNull(org.apache.calcite.rex.RexNode)">
<h3>isNull</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isNull</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;expr)</span></div>
<div class="block">Returns whether an expression always evaluates to null.
<p>Like <a href="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 class="notes">
<dt>Parameters:</dt>
<dd><code>expr</code> - Expression</dd>
<dt>Returns:</dt>
<dd>Whether expression always evaluates to null</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="expandLocalRef(org.apache.calcite.rex.RexLocalRef)">
<h3>expandLocalRef</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></span>&nbsp;<span class="element-name">expandLocalRef</span><wbr><span class="parameters">(<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&nbsp;ref)</span></div>
<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 class="notes">
<dt>Parameters:</dt>
<dd><code>ref</code> - a RexLocalRef from this program</dd>
<dt>Returns:</dt>
<dd>expanded form</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="expandList(java.util.List)">
<h3>expandList</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</span>&nbsp;<span class="element-name">expandList</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;nodes)</span></div>
<div class="block">Expands a list of expressions that may contain <a href="RexLocalRef.html" title="class in org.apache.calcite.rex"><code>RexLocalRef</code></a>s.</div>
</section>
</li>
<li>
<section class="detail" id="split()">
<h3>split</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;com.google.common.collect.ImmutableList&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;,<wbr>com.google.common.collect.ImmutableList&lt;<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&gt;</span>&nbsp;<span class="element-name">split</span>()</div>
<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>
</section>
</li>
<li>
<section class="detail" id="getCollations(java.util.List)">
<h3>getCollations</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;</span>&nbsp;<span class="element-name">getCollations</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;inputCollations)</span></div>
<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>
</section>
</li>
<li>
<section class="detail" id="deduceCollations(java.util.List,int,java.util.List,java.util.List)">
<h3>deduceCollations</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">deduceCollations</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;outputCollations,
int&nbsp;sourceCount,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>&gt;&nbsp;refs,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>&gt;&nbsp;inputCollations)</span></div>
<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>
</section>
</li>
<li>
<section class="detail" id="projectsIdentity(boolean)">
<h3>projectsIdentity</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">projectsIdentity</span><wbr><span class="parameters">(boolean&nbsp;fail)</span></div>
<div class="block">Returns whether the fields on the leading edge of the project list are
the input fields.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fail</code> - Whether to throw an assert failure if does not project
identity</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="projectsOnlyIdentity()">
<h3>projectsOnlyIdentity</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">projectsOnlyIdentity</span>()</div>
<div class="block">Returns whether this program projects precisely its input fields. It may
or may not apply a condition.</div>
</section>
</li>
<li>
<section class="detail" id="isTrivial()">
<h3>isTrivial</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isTrivial</span>()</div>
<div class="block">Returns whether this program returns its input exactly.
<p>This is a stronger condition than <a href="#projectsIdentity(boolean)"><code>projectsIdentity(boolean)</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="getReferenceCounts()">
<h3>getReferenceCounts</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int[]</span>&nbsp;<span class="element-name">getReferenceCounts</span>()</div>
<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 class="notes">
<dt>Returns:</dt>
<dd>array of reference counts; the ith element in the returned array
is the number of references to getExprList()[i]</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isConstant(org.apache.calcite.rex.RexNode)">
<h3>isConstant</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isConstant</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;ref)</span></div>
<div class="block">Returns whether an expression is constant.</div>
</section>
</li>
<li>
<section class="detail" id="gatherExpr(org.apache.calcite.rex.RexNode)">
<h3>gatherExpr</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></span>&nbsp;<span class="element-name">gatherExpr</span><wbr><span class="parameters">(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;expr)</span></div>
</section>
</li>
<li>
<section class="detail" id="getSourceField(int)">
<h3>getSourceField</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getSourceField</span><wbr><span class="parameters">(int&nbsp;outputOrdinal)</span></div>
<div class="block">Returns the input field that an output field is populated from, or -1 if
it is populated from an expression.</div>
</section>
</li>
<li>
<section class="detail" id="isPermutation()">
<h3>isPermutation</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isPermutation</span>()</div>
<div class="block">Returns whether this program is a permutation of its inputs.</div>
</section>
</li>
<li>
<section class="detail" id="getPermutation()">
<h3>getPermutation</h3>
<div class="member-signature"><span class="annotations">@CheckReturnValue
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@Nullable <a href="../util/Permutation.html" title="class in org.apache.calcite.util">Permutation</a></span>&nbsp;<span class="element-name">getPermutation</span>()</div>
<div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div>
</section>
</li>
<li>
<section class="detail" id="getCorrelVariableNames()">
<h3>getCorrelVariableNames</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">getCorrelVariableNames</span>()</div>
<div class="block">Returns the set of correlation variables used (read) by this program.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>set of correlation variable names</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isNormalized(org.apache.calcite.util.Litmus,org.apache.calcite.rex.RexBuilder)">
<h3>isNormalized</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isNormalized</span><wbr><span class="parameters">(<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a>&nbsp;litmus,
<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder)</span></div>
<div class="block">Returns whether this program is in canonical form.</div>
<dl class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>whether in canonical form</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="normalize(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexSimplify)">
<h3>normalize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">normalize</span><wbr><span class="parameters">(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
@Nullable <a href="RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a>&nbsp;simplify)</span></div>
<div class="block">Creates a simplified/normalized copy of this program.</div>
<dl class="notes">
<dt>Parameters:</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>Returns:</dt>
<dd>Normalized program</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="normalize(org.apache.calcite.rex.RexBuilder,boolean)">
<h3>normalize</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span>&nbsp;<span class="element-name">normalize</span><wbr><span class="parameters">(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
boolean&nbsp;simplify)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
</section>
</li>
<li>
<section class="detail" id="getPartialMapping(int)">
<h3>getPartialMapping</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></span>&nbsp;<span class="element-name">getPartialMapping</span><wbr><span class="parameters">(int&nbsp;inputFieldCount)</span></div>
<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 class="notes">
<dt>Parameters:</dt>
<dd><code>inputFieldCount</code> - Number of input fields</dd>
<dt>Returns:</dt>
<dd>Mapping of a set of project expressions, never null</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>