blob: c51b72ff7794e44fa3fa5ce9eea8a94c472381c0 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>PushProjector (Apache Calcite API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PushProjector (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PushProjector.html">Use</a></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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rel.rules</a></div>
<h2 title="Class PushProjector" class="title">Class PushProjector</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.rel.rules.PushProjector</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">PushProjector</span>
extends java.lang.Object</pre>
<div class="block">PushProjector is a utility class used to perform operations used in push
projection rules.
<p>Pushing is particularly interesting in the case of join, because there
are multiple inputs. Generally an expression can be pushed down to a
particular input if it depends upon no other inputs. If it can be pushed
down to both sides, it is pushed down to the left.
<p>Sometimes an expression needs to be split before it can be pushed down.
To flag that an expression cannot be split, specify a rule that it must be
<dfn>preserved</dfn>. Such an expression will be pushed down intact to one
of the inputs, or not pushed down at all.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="PushProjector.ExprCondition.html" title="interface in org.apache.calcite.rel.rules">PushProjector.ExprCondition</a></span></code></th>
<td class="colLast">
<div class="block">A functor that replies true or false for a given expression.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="PushProjector.InputSpecialOpFinder.html" title="class in org.apache.calcite.rel.rules">PushProjector.InputSpecialOpFinder</a></span></code></th>
<td class="colLast">
<div class="block">Visitor which builds a bitmap of the inputs used by an expressions, as
well as locating expressions corresponding to special operators.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="PushProjector.OperatorExprCondition.html" title="class in org.apache.calcite.rel.rules">PushProjector.OperatorExprCondition</a></span></code></th>
<td class="colLast">
<div class="block">An expression condition that evaluates to true if the expression is
a call to one of a set of operators.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="PushProjector.RefAndExprConverter.html" title="class in org.apache.calcite.rel.rules">PushProjector.RefAndExprConverter</a></span></code></th>
<td class="colLast">
<div class="block">Walks an expression tree, replacing input refs with new values to reflect
projection and converting special expressions to field references.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#childBitmap">childBitmap</a></span></code></th>
<td class="colLast">
<div class="block">Bitmap containing the fields in the RelNode that the projection is being
pushed past, if the RelNode is not a join.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#childFields">childFields</a></span></code></th>
<td class="colLast">
<div class="block">Fields from the RelNode that the projection is being pushed past</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#childPreserveExprs">childPreserveExprs</a></span></code></th>
<td class="colLast">
<div class="block">Expressions referenced in the projection/filter that should be preserved.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#childRel">childRel</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nChildFields">nChildFields</a></span></code></th>
<td class="colLast">
<div class="block">Number of fields in the RelNode that the projection is being pushed past</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nFields">nFields</a></span></code></th>
<td class="colLast">
<div class="block">Number of fields in the RelNode that the projection is being pushed past,
if the RelNode is not a join.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nFieldsRight">nFieldsRight</a></span></code></th>
<td class="colLast">
<div class="block">Number of fields in the right hand side of a join, in the case where the
projection is being pushed past a join.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nProject">nProject</a></span></code></th>
<td class="colLast">
<div class="block">Number of fields being projected.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nRightProject">nRightProject</a></span></code></th>
<td class="colLast">
<div class="block">Number of fields being projected from the right hand side of a join, in
the case where the projection is being pushed past a join.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nSysFields">nSysFields</a></span></code></th>
<td class="colLast">
<div class="block">Number of system fields.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nSystemProject">nSystemProject</a></span></code></th>
<td class="colLast">
<div class="block">Number of system fields being projected.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#origFilter">origFilter</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#origProj">origProj</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#origProjExprs">origProjExprs</a></span></code></th>
<td class="colLast">
<div class="block">Original projection expressions</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="PushProjector.ExprCondition.html" title="interface in org.apache.calcite.rel.rules">PushProjector.ExprCondition</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#preserveExprCondition">preserveExprCondition</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) java.util.BitSet</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#projRefs">projRefs</a></span></code></th>
<td class="colLast">
<div class="block">Bitmap containing the references in the original projection</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#relBuilder">relBuilder</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) <a href="../../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rexBuilder">rexBuilder</a></span></code></th>
<td class="colLast">
<div class="block">Rex builder used to create new expressions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rightBitmap">rightBitmap</a></span></code></th>
<td class="colLast">
<div class="block">Bitmap containing the fields in the right hand side of a join, in the
case where the projection is being pushed past a join.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rightPreserveExprs">rightPreserveExprs</a></span></code></th>
<td class="colLast">
<div class="block">Expressions referenced in the projection/filter that should be preserved,
corresponding to expressions on the right hand side of the join, if the
projection is being pushed past a join.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#strongBitmap">strongBitmap</a></span></code></th>
<td class="colLast">
<div class="block">Bitmap containing the fields that should be strong, i.e.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.core.Project,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.RelNode,org.apache.calcite.rel.rules.PushProjector.ExprCondition,org.apache.calcite.tools.RelBuilder)">PushProjector</a></span>&#8203;(<a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a>&nbsp;origProj,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;origFilter,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;childRel,
<a href="PushProjector.ExprCondition.html" title="interface in org.apache.calcite.rel.rules">PushProjector.ExprCondition</a>&nbsp;preserveExprCondition,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder)</code></th>
<td class="colLast">
<div class="block">Creates a PushProjector object for pushing projects past a RelNode.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertProject(org.apache.calcite.rex.RexNode)">convertProject</a></span>&#8203;(<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;defaultExpr)</code></th>
<td class="colLast">
<div class="block">Decomposes a projection to the input references referenced by a
projection and a filter, either of which is optional.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convertRefsAndExprs(org.apache.calcite.rex.RexNode,java.util.List,int%5B%5D)">convertRefsAndExprs</a></span>&#8203;(<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;rex,
java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;destFields,
int[]&nbsp;adjustments)</code></th>
<td class="colLast">
<div class="block">Clones an expression tree and walks through it, adjusting each
RexInputRef index by some amount, and converting expressions that need to
be preserved to field references.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createNewProject(org.apache.calcite.rel.RelNode,int%5B%5D)">createNewProject</a></span>&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;projChild,
int[]&nbsp;adjustments)</code></th>
<td class="colLast">
<div class="block">Creates a new projection based on the original projection, adjusting all
input refs using an adjustment array passed in.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createProjectRefsAndExprs(org.apache.calcite.rel.RelNode,boolean,boolean)">createProjectRefsAndExprs</a></span>&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;projChild,
boolean&nbsp;adjust,
boolean&nbsp;rightSide)</code></th>
<td class="colLast">
<div class="block">Creates a projection based on the inputs specified in a bitmap and the
expressions that need to be preserved.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAdjustments()">getAdjustments</a></span>()</code></th>
<td class="colLast">
<div class="block">Determines how much each input reference needs to be adjusted as a result
of projection</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#locateAllRefs()">locateAllRefs</a></span>()</code></th>
<td class="colLast">
<div class="block">Locates all references found in either the projection expressions a
filter, as well as references to expressions that should be preserved.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="origProj">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>origProj</h4>
<pre>private final&nbsp;<a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> origProj</pre>
</li>
</ul>
<a id="origFilter">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>origFilter</h4>
<pre>private final&nbsp;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> origFilter</pre>
</li>
</ul>
<a id="childRel">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>childRel</h4>
<pre>private final&nbsp;<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> childRel</pre>
</li>
</ul>
<a id="preserveExprCondition">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preserveExprCondition</h4>
<pre>private final&nbsp;<a href="PushProjector.ExprCondition.html" title="interface in org.apache.calcite.rel.rules">PushProjector.ExprCondition</a> preserveExprCondition</pre>
</li>
</ul>
<a id="relBuilder">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>relBuilder</h4>
<pre>private final&nbsp;<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder</pre>
</li>
</ul>
<a id="origProjExprs">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>origProjExprs</h4>
<pre>final&nbsp;java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt; origProjExprs</pre>
<div class="block">Original projection expressions</div>
</li>
</ul>
<a id="childFields">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>childFields</h4>
<pre>final&nbsp;java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt; childFields</pre>
<div class="block">Fields from the RelNode that the projection is being pushed past</div>
</li>
</ul>
<a id="nChildFields">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nChildFields</h4>
<pre>final&nbsp;int nChildFields</pre>
<div class="block">Number of fields in the RelNode that the projection is being pushed past</div>
</li>
</ul>
<a id="projRefs">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>projRefs</h4>
<pre>final&nbsp;java.util.BitSet projRefs</pre>
<div class="block">Bitmap containing the references in the original projection</div>
</li>
</ul>
<a id="childBitmap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>childBitmap</h4>
<pre>final&nbsp;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> childBitmap</pre>
<div class="block">Bitmap containing the fields in the RelNode that the projection is being
pushed past, if the RelNode is not a join. If the RelNode is a join, then
the fields correspond to the left hand side of the join.</div>
</li>
</ul>
<a id="rightBitmap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rightBitmap</h4>
<pre>final&nbsp;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> rightBitmap</pre>
<div class="block">Bitmap containing the fields in the right hand side of a join, in the
case where the projection is being pushed past a join. Not used
otherwise.</div>
</li>
</ul>
<a id="strongBitmap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>strongBitmap</h4>
<pre>final&nbsp;<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> strongBitmap</pre>
<div class="block">Bitmap containing the fields that should be strong, i.e. when preserving expressions
we can only preserve them if the expressions if it is null when these fields are null.</div>
</li>
</ul>
<a id="nFields">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nFields</h4>
<pre>final&nbsp;int nFields</pre>
<div class="block">Number of fields in the RelNode that the projection is being pushed past,
if the RelNode is not a join. If the RelNode is a join, then this is the
number of fields in the left hand side of the join.
<p>The identity
<code>nChildFields == nSysFields + nFields + nFieldsRight</code>
holds. <code>nFields</code> does not include <code>nSysFields</code>.
The output of a join looks like this:
<blockquote><pre>
| nSysFields | nFields | nFieldsRight |
</pre></blockquote>
<p>The output of a single-input rel looks like this:
<blockquote><pre>
| nSysFields | nFields |
</pre></blockquote></div>
</li>
</ul>
<a id="nFieldsRight">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nFieldsRight</h4>
<pre>final&nbsp;int nFieldsRight</pre>
<div class="block">Number of fields in the right hand side of a join, in the case where the
projection is being pushed past a join. Always 0 otherwise.</div>
</li>
</ul>
<a id="nSysFields">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nSysFields</h4>
<pre>private final&nbsp;int nSysFields</pre>
<div class="block">Number of system fields. System fields appear at the start of a join,
before the first field from the left input.</div>
</li>
</ul>
<a id="childPreserveExprs">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>childPreserveExprs</h4>
<pre>final&nbsp;java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt; childPreserveExprs</pre>
<div class="block">Expressions referenced in the projection/filter that should be preserved.
In the case where the projection is being pushed past a join, then the
list only contains the expressions corresponding to the left hand side of
the join.</div>
</li>
</ul>
<a id="rightPreserveExprs">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rightPreserveExprs</h4>
<pre>final&nbsp;java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt; rightPreserveExprs</pre>
<div class="block">Expressions referenced in the projection/filter that should be preserved,
corresponding to expressions on the right hand side of the join, if the
projection is being pushed past a join. Empty list otherwise.</div>
</li>
</ul>
<a id="nSystemProject">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nSystemProject</h4>
<pre>int nSystemProject</pre>
<div class="block">Number of system fields being projected.</div>
</li>
</ul>
<a id="nProject">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nProject</h4>
<pre>int nProject</pre>
<div class="block">Number of fields being projected. In the case where the projection is
being pushed past a join, the number of fields being projected from the
left hand side of the join.</div>
</li>
</ul>
<a id="nRightProject">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nRightProject</h4>
<pre>int nRightProject</pre>
<div class="block">Number of fields being projected from the right hand side of a join, in
the case where the projection is being pushed past a join. 0 otherwise.</div>
</li>
</ul>
<a id="rexBuilder">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>rexBuilder</h4>
<pre>final&nbsp;<a href="../../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder</pre>
<div class="block">Rex builder used to create new expressions.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.calcite.rel.core.Project,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.RelNode,org.apache.calcite.rel.rules.PushProjector.ExprCondition,org.apache.calcite.tools.RelBuilder)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PushProjector</h4>
<pre>public&nbsp;PushProjector&#8203;(<a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a>&nbsp;origProj,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;origFilter,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;childRel,
<a href="PushProjector.ExprCondition.html" title="interface in org.apache.calcite.rel.rules">PushProjector.ExprCondition</a>&nbsp;preserveExprCondition,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder)</pre>
<div class="block">Creates a PushProjector object for pushing projects past a RelNode.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>origProj</code> - the original projection that is being pushed;
may be null if the projection is implied as a
result of a projection having been trivially
removed</dd>
<dd><code>origFilter</code> - the filter that the projection must also be
pushed past, if applicable</dd>
<dd><code>childRel</code> - the RelNode that the projection is being
pushed past</dd>
<dd><code>preserveExprCondition</code> - condition for whether an expression should
be preserved in the projection</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="convertProject(org.apache.calcite.rex.RexNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertProject</h4>
<pre class="methodSignature">public&nbsp;<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;convertProject&#8203;(<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;defaultExpr)</pre>
<div class="block">Decomposes a projection to the input references referenced by a
projection and a filter, either of which is optional. If both are
provided, the filter is underneath the project.
<p>Creates a projection containing all input references as well as
preserving any special expressions. Converts the original projection
and/or filter to reference the new projection. Then, finally puts on top,
a final projection corresponding to the original projection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>defaultExpr</code> - expression to be used in the projection if no fields
or special columns are selected</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the converted projection if it makes sense to push elements of
the projection; otherwise returns null</dd>
</dl>
</li>
</ul>
<a id="locateAllRefs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>locateAllRefs</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;locateAllRefs()</pre>
<div class="block">Locates all references found in either the projection expressions a
filter, as well as references to expressions that should be preserved.
Based on that, determines whether pushing the projection makes sense.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if all inputs from the child that the projection is being
pushed past are referenced in the projection/filter and no special
preserve expressions are referenced; in that case, it does not make sense
to push the projection</dd>
</dl>
</li>
</ul>
<a id="createProjectRefsAndExprs(org.apache.calcite.rel.RelNode,boolean,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createProjectRefsAndExprs</h4>
<pre class="methodSignature">public&nbsp;<a href="../core/Project.html" title="class in org.apache.calcite.rel.core">Project</a>&nbsp;createProjectRefsAndExprs&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;projChild,
boolean&nbsp;adjust,
boolean&nbsp;rightSide)</pre>
<div class="block">Creates a projection based on the inputs specified in a bitmap and the
expressions that need to be preserved. The expressions are appended after
the input references.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>projChild</code> - child that the projection will be created on top of</dd>
<dd><code>adjust</code> - if true, need to create new projection expressions;
otherwise, the existing ones are reused</dd>
<dd><code>rightSide</code> - if true, creating a projection for the right hand side
of a join</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>created projection</dd>
</dl>
</li>
</ul>
<a id="getAdjustments()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAdjustments</h4>
<pre class="methodSignature">public&nbsp;int[]&nbsp;getAdjustments()</pre>
<div class="block">Determines how much each input reference needs to be adjusted as a result
of projection</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>array indicating how much each input needs to be adjusted by</dd>
</dl>
</li>
</ul>
<a id="convertRefsAndExprs(org.apache.calcite.rex.RexNode,java.util.List,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertRefsAndExprs</h4>
<pre class="methodSignature">public&nbsp;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;convertRefsAndExprs&#8203;(<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;rex,
java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;destFields,
int[]&nbsp;adjustments)</pre>
<div class="block">Clones an expression tree and walks through it, adjusting each
RexInputRef index by some amount, and converting expressions that need to
be preserved to field references.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rex</code> - the expression</dd>
<dd><code>destFields</code> - fields that the new expressions will be referencing</dd>
<dd><code>adjustments</code> - the amount each input reference index needs to be
adjusted by</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>modified expression tree</dd>
</dl>
</li>
</ul>
<a id="createNewProject(org.apache.calcite.rel.RelNode,int[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createNewProject</h4>
<pre class="methodSignature">public&nbsp;<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;createNewProject&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;projChild,
int[]&nbsp;adjustments)</pre>
<div class="block">Creates a new projection based on the original projection, adjusting all
input refs using an adjustment array passed in. If there was no original
projection, create a new one that selects every field from the underlying
rel.
<p>If the resulting projection would be trivial, return the child.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>projChild</code> - child of the new project</dd>
<dd><code>adjustments</code> - array indicating how much each input reference should
be adjusted by</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the created projection</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PushProjector.html">Use</a></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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>