blob: c348afbe8adadf784a4bf4b4814d0c001709911a [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>RelFieldTrimmer (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="RelFieldTrimmer (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":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/RelFieldTrimmer.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.sql2rel</a></div>
<h2 title="Class RelFieldTrimmer" class="title">Class RelFieldTrimmer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.sql2rel.RelFieldTrimmer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">RelFieldTrimmer</span>
extends java.lang.Object
implements <a href="../util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a></pre>
<div class="block">Transformer that walks over a tree of relational expressions, replacing each
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> with a 'slimmed down' relational expression that projects
only the columns required by its consumer.
<p>Uses multi-methods to fire the right rule for each type of relational
expression. This allows the transformer to be extended without having to
add a new method to RelNode, and without requiring a collection of rule
classes scattered to the four winds.
<p>REVIEW: jhyde, 2009/7/28: Is sql2rel the correct package for this class?
Trimming fields is not an essential part of SQL-to-Rel translation, and
arguably belongs in the optimization phase. But this transformer does not
obey the usual pattern for planner rules; it is difficult to do so, because
each <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> needs to return a different set of fields after
trimming.
<p>TODO: Change 2nd arg of the <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet, java.util.Set&lt;org.apache.calcite.rel.type.RelDataTypeField&gt;)</code></a> method from BitSet to
Mapping. Sometimes it helps the consumer if you return the columns in a
particular order. For instance, it may avoid a project at the top of the
tree just for reordering. Could ease the transition by writing methods that
convert BitSet to Mapping and vice versa.</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>protected static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></span></code></th>
<td class="colLast">
<div class="block">Result of an attempt to trim columns from a relational expression.</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>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>private <a href="../util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a>&lt;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFieldsDispatcher">trimFieldsDispatcher</a></span></code></th>
<td class="colLast">&nbsp;</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.sql.validate.SqlValidator,org.apache.calcite.plan.RelOptCluster,org.apache.calcite.rel.core.RelFactories.ProjectFactory,org.apache.calcite.rel.core.RelFactories.FilterFactory,org.apache.calcite.rel.core.RelFactories.JoinFactory,org.apache.calcite.rel.core.RelFactories.SortFactory,org.apache.calcite.rel.core.RelFactories.AggregateFactory,org.apache.calcite.rel.core.RelFactories.SetOpFactory)">RelFieldTrimmer</a></span>&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../rel/core/RelFactories.ProjectFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.ProjectFactory</a>&nbsp;projectFactory,
<a href="../rel/core/RelFactories.FilterFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.FilterFactory</a>&nbsp;filterFactory,
<a href="../rel/core/RelFactories.JoinFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.JoinFactory</a>&nbsp;joinFactory,
<a href="../rel/core/RelFactories.SortFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.SortFactory</a>&nbsp;sortFactory,
<a href="../rel/core/RelFactories.AggregateFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.AggregateFactory</a>&nbsp;aggregateFactory,
<a href="../rel/core/RelFactories.SetOpFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.SetOpFactory</a>&nbsp;setOpFactory)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.tools.RelBuilder)">RelFieldTrimmer</a></span>&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<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 RelFieldTrimmer.</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>protected <a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createMapping(org.apache.calcite.util.ImmutableBitSet,int)">createMapping</a></span>&#8203;(<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
int&nbsp;fieldCount)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dispatchTrimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">dispatchTrimFields</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Invokes <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet, java.util.Set&lt;org.apache.calcite.rel.type.RelDataTypeField&gt;)</code></a>, or the appropriate method for the type
of the rel parameter, using multi-method dispatch.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dummyProject(int,org.apache.calcite.rel.RelNode)">dummyProject</a></span>&#8203;(int&nbsp;fieldCount,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input)</code></th>
<td class="colLast">
<div class="block">Creates a project with a dummy column, to protect the parts of the system
that cannot handle a relational expression with no columns.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#result(org.apache.calcite.rel.RelNode,org.apache.calcite.util.mapping.Mapping)">result</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;r,
<a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a>&nbsp;mapping)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trim(org.apache.calcite.rel.RelNode)">trim</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;root)</code></th>
<td class="colLast">
<div class="block">Trims unused fields from a relational expression.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimChild(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimChild</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Trims the fields of an input relational expression.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimChildRestore(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimChildRestore</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Trims a child relational expression, then adds back a dummy project to
restore the fields that were removed.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.Aggregate,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a>&nbsp;aggregate,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalAggregate.html" title="class in org.apache.calcite.rel.logical"><code>LogicalAggregate</code></a>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.Filter,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/Filter.html" title="class in org.apache.calcite.rel.core">Filter</a>&nbsp;filter,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalFilter.html" title="class in org.apache.calcite.rel.logical"><code>LogicalFilter</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.Join,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a>&nbsp;join,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalJoin.html" title="class in org.apache.calcite.rel.logical"><code>LogicalJoin</code></a>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.Project,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a>&nbsp;project,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical"><code>LogicalProject</code></a>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.SetOp,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/SetOp.html" title="class in org.apache.calcite.rel.core">SetOp</a>&nbsp;setOp,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/core/SetOp.html" title="class in org.apache.calcite.rel.core"><code>SetOp</code></a> (including UNION and UNION ALL).</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.Sort,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core">Sort</a>&nbsp;sort,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core"><code>Sort</code></a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.core.TableScan,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core">TableScan</a>&nbsp;tableAccessRel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableScan.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableScan</code></a>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.logical.LogicalTableFunctionScan,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical">LogicalTableFunctionScan</a>&nbsp;tabFun,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableFunctionScan</code></a>.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.logical.LogicalTableModify,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical">LogicalTableModify</a>&nbsp;modifier,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableModify</code></a>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.logical.LogicalValues,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical">LogicalValues</a>&nbsp;values,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical"><code>LogicalValues</code></a>.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">trimFields</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</code></th>
<td class="colLast">
<div class="block">Visit method, per <a href="../util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util"><code>ReflectiveVisitor</code></a>.</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="trimFieldsDispatcher">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFieldsDispatcher</h4>
<pre>private final&nbsp;<a href="../util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a>&lt;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&gt; trimFieldsDispatcher</pre>
</li>
</ul>
<a id="relBuilder">
<!-- -->
</a>
<ul class="blockListLast">
<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>
</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.sql.validate.SqlValidator,org.apache.calcite.tools.RelBuilder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RelFieldTrimmer</h4>
<pre>public&nbsp;RelFieldTrimmer&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder)</pre>
<div class="block">Creates a RelFieldTrimmer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>validator</code> - Validator</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.plan.RelOptCluster,org.apache.calcite.rel.core.RelFactories.ProjectFactory,org.apache.calcite.rel.core.RelFactories.FilterFactory,org.apache.calcite.rel.core.RelFactories.JoinFactory,org.apache.calcite.rel.core.RelFactories.SortFactory,org.apache.calcite.rel.core.RelFactories.AggregateFactory,org.apache.calcite.rel.core.RelFactories.SetOpFactory)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RelFieldTrimmer</h4>
<pre>@Deprecated
public&nbsp;RelFieldTrimmer&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="../plan/RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a>&nbsp;cluster,
<a href="../rel/core/RelFactories.ProjectFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.ProjectFactory</a>&nbsp;projectFactory,
<a href="../rel/core/RelFactories.FilterFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.FilterFactory</a>&nbsp;filterFactory,
<a href="../rel/core/RelFactories.JoinFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.JoinFactory</a>&nbsp;joinFactory,
<a href="../rel/core/RelFactories.SortFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.SortFactory</a>&nbsp;sortFactory,
<a href="../rel/core/RelFactories.AggregateFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.AggregateFactory</a>&nbsp;aggregateFactory,
<a href="../rel/core/RelFactories.SetOpFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.SetOpFactory</a>&nbsp;setOpFactory)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</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="trim(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trim</h4>
<pre class="methodSignature">public&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;trim&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;root)</pre>
<div class="block">Trims unused fields from a relational expression.
<p>We presume that all fields of the relational expression are wanted by
its consumer, so only trim fields that are not used within the tree.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>root</code> - Root node of relational expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Trimmed relational expression</dd>
</dl>
</li>
</ul>
<a id="trimChild(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimChild</h4>
<pre class="methodSignature">protected&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimChild&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Trims the fields of an input relational expression.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rel</code> - Relational expression</dd>
<dd><code>input</code> - Input relational expression, whose fields to trim</dd>
<dd><code>fieldsUsed</code> - Bitmap of fields needed by the consumer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New relational expression and its field mapping</dd>
</dl>
</li>
</ul>
<a id="trimChildRestore(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimChildRestore</h4>
<pre class="methodSignature">protected&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimChildRestore&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Trims a child relational expression, then adds back a dummy project to
restore the fields that were removed.
<p>Sounds pointless? It causes unused fields to be removed
further down the tree (towards the leaves), but it ensure that the
consuming relational expression continues to see the same fields.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rel</code> - Relational expression</dd>
<dd><code>input</code> - Input relational expression, whose fields to trim</dd>
<dd><code>fieldsUsed</code> - Bitmap of fields needed by the consumer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New relational expression and its field mapping</dd>
</dl>
</li>
</ul>
<a id="dispatchTrimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispatchTrimFields</h4>
<pre class="methodSignature">protected final&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;dispatchTrimFields&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Invokes <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet, java.util.Set&lt;org.apache.calcite.rel.type.RelDataTypeField&gt;)</code></a>, or the appropriate method for the type
of the rel parameter, using multi-method dispatch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rel</code> - Relational expression</dd>
<dd><code>fieldsUsed</code> - Bitmap of fields needed by the consumer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New relational expression and its field mapping</dd>
</dl>
</li>
</ul>
<a id="result(org.apache.calcite.rel.RelNode,org.apache.calcite.util.mapping.Mapping)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>result</h4>
<pre class="methodSignature">protected&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;result&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;r,
<a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a>&nbsp;mapping)</pre>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Visit method, per <a href="../util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util"><code>ReflectiveVisitor</code></a>.
<p>This method is invoked reflectively, so there may not be any apparent
calls to it. The class (or derived classes) may contain overloads of
this method with more specific types for the <code>rel</code> parameter.
<p>Returns a pair: the relational expression created, and the mapping
between the original fields and the fields of the newly created
relational expression.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rel</code> - Relational expression</dd>
<dd><code>fieldsUsed</code> - Fields needed by the consumer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>relational expression and mapping</dd>
</dl>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.Project,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a>&nbsp;project,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical"><code>LogicalProject</code></a>.</div>
</li>
</ul>
<a id="dummyProject(int,org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dummyProject</h4>
<pre class="methodSignature">protected&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;dummyProject&#8203;(int&nbsp;fieldCount,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;input)</pre>
<div class="block">Creates a project with a dummy column, to protect the parts of the system
that cannot handle a relational expression with no columns.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fieldCount</code> - Number of fields in the original relational expression</dd>
<dd><code>input</code> - Trimmed input</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Dummy project, or null if no dummy is required</dd>
</dl>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.Filter,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/Filter.html" title="class in org.apache.calcite.rel.core">Filter</a>&nbsp;filter,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalFilter.html" title="class in org.apache.calcite.rel.logical"><code>LogicalFilter</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.Sort,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core">Sort</a>&nbsp;sort,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core"><code>Sort</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.Join,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a>&nbsp;join,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalJoin.html" title="class in org.apache.calcite.rel.logical"><code>LogicalJoin</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.SetOp,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/SetOp.html" title="class in org.apache.calcite.rel.core">SetOp</a>&nbsp;setOp,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/core/SetOp.html" title="class in org.apache.calcite.rel.core"><code>SetOp</code></a> (including UNION and UNION ALL).</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.Aggregate,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a>&nbsp;aggregate,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalAggregate.html" title="class in org.apache.calcite.rel.logical"><code>LogicalAggregate</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.logical.LogicalTableModify,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical">LogicalTableModify</a>&nbsp;modifier,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableModify</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.logical.LogicalTableFunctionScan,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical">LogicalTableFunctionScan</a>&nbsp;tabFun,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableFunctionScan</code></a>.</div>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.logical.LogicalValues,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical">LogicalValues</a>&nbsp;values,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical"><code>LogicalValues</code></a>.</div>
</li>
</ul>
<a id="createMapping(org.apache.calcite.util.ImmutableBitSet,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMapping</h4>
<pre class="methodSignature">protected&nbsp;<a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a>&nbsp;createMapping&#8203;(<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
int&nbsp;fieldCount)</pre>
</li>
</ul>
<a id="trimFields(org.apache.calcite.rel.core.TableScan,org.apache.calcite.util.ImmutableBitSet,java.util.Set)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>trimFields</h4>
<pre class="methodSignature">public&nbsp;<a href="RelFieldTrimmer.TrimResult.html" title="class in org.apache.calcite.sql2rel">RelFieldTrimmer.TrimResult</a>&nbsp;trimFields&#8203;(<a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core">TableScan</a>&nbsp;tableAccessRel,
<a href="../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;fieldsUsed,
java.util.Set&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;extraFields)</pre>
<div class="block">Variant of <a href="#trimFields(org.apache.calcite.rel.RelNode,org.apache.calcite.util.ImmutableBitSet,java.util.Set)"><code>trimFields(RelNode, ImmutableBitSet, Set)</code></a> for
<a href="../rel/logical/LogicalTableScan.html" title="class in org.apache.calcite.rel.logical"><code>LogicalTableScan</code></a>.</div>
</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/RelFieldTrimmer.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>