blob: df993f3d2560a1ac600be46e509770a61e9286d3 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>RelStructuredTypeFlattener (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="RelStructuredTypeFlattener (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,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":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/RelStructuredTypeFlattener.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 RelStructuredTypeFlattener" class="title">Class RelStructuredTypeFlattener</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.sql2rel.RelStructuredTypeFlattener</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">RelStructuredTypeFlattener</span>
extends java.lang.Object
implements <a href="../util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a></pre>
<div class="block">RelStructuredTypeFlattener removes all structured types from a tree of
relational expressions. Because it must operate globally on the tree, it is
implemented as an explicit self-contained rewrite operation instead of via
normal optimizer rules. This approach has the benefit that real optimizer and
codegen rules never have to deal with structured types.
<p>As an example, suppose we have a structured type <code>ST(A1 smallint, A2
bigint)</code>, a table <code>T(c1 ST, c2 double)</code>, and a query <code>
select t.c2, t.c1.a2 from t</code>. After SqlToRelConverter executes, the
unflattened tree looks like:
<blockquote><pre><code>
LogicalProject(C2=[$1], A2=[$0.A2])
LogicalTableScan(table=[T])
</code></pre></blockquote>
<p>After flattening, the resulting tree looks like
<blockquote><pre><code>
LogicalProject(C2=[$3], A2=[$2])
FtrsIndexScanRel(table=[T], index=[clustered])
</code></pre></blockquote>
<p>The index scan produces a flattened row type <code>(boolean, smallint,
bigint, double)</code> (the boolean is a null indicator for c1), and the
projection picks out the desired attributes (omitting <code>$0</code> and
<code>$1</code> altogether). After optimization, the projection might be
pushed down into the index scan, resulting in a final tree like
<blockquote><pre><code>
FtrsIndexScanRel(table=[T], index=[clustered], projection=[3, 2])
</code></pre></blockquote></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>private class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="RelStructuredTypeFlattener.RewriteRelVisitor.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRelVisitor</a></span></code></th>
<td class="colLast">
<div class="block">Visitor that flattens each relational expression in a tree.</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="RelStructuredTypeFlattener.RewriteRexShuttle.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRexShuttle</a></span></code></th>
<td class="colLast">
<div class="block">Shuttle that rewrites scalar expressions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="RelStructuredTypeFlattener.SelfFlatteningRel.html" title="interface in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.SelfFlatteningRel</a></span></code></th>
<td class="colLast">
<div class="block">Mix-in interface for relational expressions that know how to
flatten themselves.</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="../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="#currentRel">currentRel</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenedRootType">flattenedRootType</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iRestructureInput">iRestructureInput</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private java.util.Map&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,&#8203;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#oldToNewRelMap">oldToNewRelMap</a></span></code></th>
<td class="colLast">&nbsp;</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>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#restructure">restructure</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#restructured">restructured</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>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">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toRelContext">toRelContext</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.rex.RexBuilder,org.apache.calcite.plan.RelOptTable.ToRelContext,boolean)">RelStructuredTypeFlattener</a></span>&#8203;(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a>&nbsp;toRelContext,
boolean&nbsp;restructure)</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.tools.RelBuilder,org.apache.calcite.rex.RexBuilder,org.apache.calcite.plan.RelOptTable.ToRelContext,boolean)">RelStructuredTypeFlattener</a></span>&#8203;(<a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a>&nbsp;toRelContext,
boolean&nbsp;restructure)</code></th>
<td class="colLast">&nbsp;</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>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#calculateFlattenedOffset(org.apache.calcite.rel.type.RelDataType,int)">calculateFlattenedOffset</a></span>&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
int&nbsp;ordinal)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenInputs(java.util.List,org.apache.calcite.rex.RexNode,java.util.List)">flattenInputs</a></span>&#8203;(java.util.List&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;fieldList,
<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;prefix,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExpList)</code></th>
<td class="colLast">
<div class="block">Generates expressions that reference the flattened input fields from
a given row type.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenNullLiteral(org.apache.calcite.rel.type.RelDataType,java.util.List)">flattenNullLiteral</a></span>&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenProjection(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.RewriteRexShuttle,org.apache.calcite.rex.RexNode,java.lang.String,java.util.List)">flattenProjection</a></span>&#8203;(<a href="RelStructuredTypeFlattener.RewriteRexShuttle.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRexShuttle</a>&nbsp;shuttle,
<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;exp,
java.lang.String&nbsp;fieldName,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenProjections(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.RewriteRexShuttle,java.util.List,java.util.List,java.lang.String,java.util.List)">flattenProjections</a></span>&#8203;(<a href="RelStructuredTypeFlattener.RewriteRexShuttle.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRexShuttle</a>&nbsp;shuttle,
java.util.List&lt;? extends <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;exps,
java.util.List&lt;java.lang.String&gt;&nbsp;fieldNames,
java.lang.String&nbsp;prefix,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="../linq4j/Ord.html" title="class in org.apache.calcite.linq4j">Ord</a>&lt;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNewFieldForOldInput(int)">getNewFieldForOldInput</a></span>&#8203;(int&nbsp;oldOrdinal)</code></th>
<td class="colLast">
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening, and also returns its type.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>private <a href="../linq4j/Ord.html" title="class in org.apache.calcite.linq4j">Ord</a>&lt;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNewFieldForOldInput(int,int)">getNewFieldForOldInput</a></span>&#8203;(int&nbsp;oldOrdinal,
int&nbsp;existingOffset)</code></th>
<td class="colLast">
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening, and also returns its type.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNewForOldInput(int)">getNewForOldInput</a></span>&#8203;(int&nbsp;oldOrdinal)</code></th>
<td class="colLast">
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>private <a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNewForOldInputMapping(org.apache.calcite.rel.RelNode)">getNewForOldInputMapping</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel)</code></th>
<td class="colLast">
<div class="block">Returns a mapping between old and new fields.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected <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="#getNewForOldRel(org.apache.calcite.rel.RelNode)">getNewForOldRel</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isConstructor(org.apache.calcite.rex.RexNode)">isConstructor</a></span>&#8203;(<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;rexNode)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" 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="#restructure(org.apache.calcite.rel.type.RelDataType)">restructure</a></span>&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;structuredType)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>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="#restructureFields(org.apache.calcite.rel.type.RelDataType)">restructureFields</a></span>&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;structuredType)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<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="#rewrite(org.apache.calcite.rel.RelNode)">rewrite</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;root)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteGeneric(org.apache.calcite.rel.RelNode)">rewriteGeneric</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.core.Collect)">rewriteRel</a></span>&#8203;(<a href="../rel/core/Collect.html" title="class in org.apache.calcite.rel.core">Collect</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.core.Sample)">rewriteRel</a></span>&#8203;(<a href="../rel/core/Sample.html" title="class in org.apache.calcite.rel.core">Sample</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.core.Sort)">rewriteRel</a></span>&#8203;(<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core">Sort</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.core.TableScan)">rewriteRel</a></span>&#8203;(<a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core">TableScan</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.core.Uncollect)">rewriteRel</a></span>&#8203;(<a href="../rel/core/Uncollect.html" title="class in org.apache.calcite.rel.core">Uncollect</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalAggregate)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalAggregate.html" title="class in org.apache.calcite.rel.logical">LogicalAggregate</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalCalc)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalCalc.html" title="class in org.apache.calcite.rel.logical">LogicalCalc</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalCorrelate)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalCorrelate.html" title="class in org.apache.calcite.rel.logical">LogicalCorrelate</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalFilter)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalFilter.html" title="class in org.apache.calcite.rel.logical">LogicalFilter</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalIntersect)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalIntersect.html" title="class in org.apache.calcite.rel.logical">LogicalIntersect</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalJoin)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalJoin.html" title="class in org.apache.calcite.rel.logical">LogicalJoin</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalMatch)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalMatch.html" title="class in org.apache.calcite.rel.logical">LogicalMatch</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalMinus)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalMinus.html" title="class in org.apache.calcite.rel.logical">LogicalMinus</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalProject)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical">LogicalProject</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalSnapshot)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalSnapshot.html" title="class in org.apache.calcite.rel.logical">LogicalSnapshot</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalTableFunctionScan)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical">LogicalTableFunctionScan</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalTableModify)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical">LogicalTableModify</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalUnion)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalUnion.html" title="class in org.apache.calcite.rel.logical">LogicalUnion</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.logical.LogicalValues)">rewriteRel</a></span>&#8203;(<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical">LogicalValues</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.stream.LogicalChi)">rewriteRel</a></span>&#8203;(<a href="../rel/stream/LogicalChi.html" title="class in org.apache.calcite.rel.stream">LogicalChi</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.rel.stream.LogicalDelta)">rewriteRel</a></span>&#8203;(<a href="../rel/stream/LogicalDelta.html" title="class in org.apache.calcite.rel.stream">LogicalDelta</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rewriteRel(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.SelfFlatteningRel)">rewriteRel</a></span>&#8203;(<a href="RelStructuredTypeFlattener.SelfFlatteningRel.html" title="interface in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.SelfFlatteningRel</a>&nbsp;rel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setNewForOldRel(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode)">setNewForOldRel</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;newRel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateRelInMap(com.google.common.collect.SortedSetMultimap)">updateRelInMap</a></span>&#8203;(com.google.common.collect.SortedSetMultimap&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,&#8203;<a href="../rel/core/CorrelationId.html" title="class in org.apache.calcite.rel.core">CorrelationId</a>&gt;&nbsp;mapRefRelToCorVar)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateRelInMap(java.util.SortedMap)">updateRelInMap</a></span>&#8203;(java.util.SortedMap&lt;<a href="../rel/core/CorrelationId.html" title="class in org.apache.calcite.rel.core">CorrelationId</a>,&#8203;<a href="../rel/logical/LogicalCorrelate.html" title="class in org.apache.calcite.rel.logical">LogicalCorrelate</a>&gt;&nbsp;mapCorVarToCorRel)</code></th>
<td class="colLast">&nbsp;</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="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="rexBuilder">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rexBuilder</h4>
<pre>private final&nbsp;<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder</pre>
</li>
</ul>
<a id="restructure">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restructure</h4>
<pre>private final&nbsp;boolean restructure</pre>
</li>
</ul>
<a id="oldToNewRelMap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>oldToNewRelMap</h4>
<pre>private final&nbsp;java.util.Map&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,&#8203;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt; oldToNewRelMap</pre>
</li>
</ul>
<a id="currentRel">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currentRel</h4>
<pre>private&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> currentRel</pre>
</li>
</ul>
<a id="iRestructureInput">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iRestructureInput</h4>
<pre>private&nbsp;int iRestructureInput</pre>
</li>
</ul>
<a id="flattenedRootType">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenedRootType</h4>
<pre>private&nbsp;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> flattenedRootType</pre>
</li>
</ul>
<a id="restructured">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restructured</h4>
<pre>boolean restructured</pre>
</li>
</ul>
<a id="toRelContext">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toRelContext</h4>
<pre>private final&nbsp;<a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a> toRelContext</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.rex.RexBuilder,org.apache.calcite.plan.RelOptTable.ToRelContext,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RelStructuredTypeFlattener</h4>
<pre>@Deprecated
public&nbsp;RelStructuredTypeFlattener&#8203;(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a>&nbsp;toRelContext,
boolean&nbsp;restructure)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rex.RexBuilder,org.apache.calcite.plan.RelOptTable.ToRelContext,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RelStructuredTypeFlattener</h4>
<pre>public&nbsp;RelStructuredTypeFlattener&#8203;(<a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="../plan/RelOptTable.ToRelContext.html" title="interface in org.apache.calcite.plan">RelOptTable.ToRelContext</a>&nbsp;toRelContext,
boolean&nbsp;restructure)</pre>
</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="updateRelInMap(com.google.common.collect.SortedSetMultimap)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateRelInMap</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;updateRelInMap&#8203;(com.google.common.collect.SortedSetMultimap&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,&#8203;<a href="../rel/core/CorrelationId.html" title="class in org.apache.calcite.rel.core">CorrelationId</a>&gt;&nbsp;mapRefRelToCorVar)</pre>
</li>
</ul>
<a id="updateRelInMap(java.util.SortedMap)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateRelInMap</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;updateRelInMap&#8203;(java.util.SortedMap&lt;<a href="../rel/core/CorrelationId.html" title="class in org.apache.calcite.rel.core">CorrelationId</a>,&#8203;<a href="../rel/logical/LogicalCorrelate.html" title="class in org.apache.calcite.rel.logical">LogicalCorrelate</a>&gt;&nbsp;mapCorVarToCorRel)</pre>
</li>
</ul>
<a id="rewrite(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewrite</h4>
<pre class="methodSignature">public&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rewrite&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;root)</pre>
</li>
</ul>
<a id="restructureFields(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restructureFields</h4>
<pre class="methodSignature">private&nbsp;java.util.List&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;restructureFields&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;structuredType)</pre>
</li>
</ul>
<a id="restructure(org.apache.calcite.rel.type.RelDataType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restructure</h4>
<pre class="methodSignature">private&nbsp;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;restructure&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;structuredType)</pre>
</li>
</ul>
<a id="setNewForOldRel(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNewForOldRel</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;setNewForOldRel&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;newRel)</pre>
</li>
</ul>
<a id="getNewForOldRel(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewForOldRel</h4>
<pre class="methodSignature">protected&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;getNewForOldRel&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel)</pre>
</li>
</ul>
<a id="getNewForOldInput(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewForOldInput</h4>
<pre class="methodSignature">protected&nbsp;int&nbsp;getNewForOldInput&#8203;(int&nbsp;oldOrdinal)</pre>
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oldOrdinal</code> - Pre-flattening ordinal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Post-flattening ordinal</dd>
</dl>
</li>
</ul>
<a id="getNewFieldForOldInput(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewFieldForOldInput</h4>
<pre class="methodSignature">private&nbsp;<a href="../linq4j/Ord.html" title="class in org.apache.calcite.linq4j">Ord</a>&lt;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;getNewFieldForOldInput&#8203;(int&nbsp;oldOrdinal,
int&nbsp;existingOffset)</pre>
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening, and also returns its type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oldOrdinal</code> - Pre-flattening ordinal</dd>
<dd><code>existingOffset</code> - offset already calculated the target column inside the oldOrdinal column.
For unnested column, it should be 0.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Post-flattening ordinal and type</dd>
</dl>
</li>
</ul>
<a id="getNewFieldForOldInput(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewFieldForOldInput</h4>
<pre class="methodSignature">protected&nbsp;<a href="../linq4j/Ord.html" title="class in org.apache.calcite.linq4j">Ord</a>&lt;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&gt;&nbsp;getNewFieldForOldInput&#8203;(int&nbsp;oldOrdinal)</pre>
<div class="block">Maps the ordinal of a field pre-flattening to the ordinal of the
corresponding field post-flattening, and also returns its type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oldOrdinal</code> - Pre-flattening ordinal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Post-flattening ordinal and type</dd>
</dl>
</li>
</ul>
<a id="getNewForOldInputMapping(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewForOldInputMapping</h4>
<pre class="methodSignature">private&nbsp;<a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a>&nbsp;getNewForOldInputMapping&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;oldRel)</pre>
<div class="block">Returns a mapping between old and new fields.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oldRel</code> - Old relational expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Mapping between fields of old and new</dd>
</dl>
</li>
</ul>
<a id="calculateFlattenedOffset(org.apache.calcite.rel.type.RelDataType,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calculateFlattenedOffset</h4>
<pre class="methodSignature">private&nbsp;int&nbsp;calculateFlattenedOffset&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;rowType,
int&nbsp;ordinal)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalTableModify)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalTableModify.html" title="class in org.apache.calcite.rel.logical">LogicalTableModify</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalAggregate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalAggregate.html" title="class in org.apache.calcite.rel.logical">LogicalAggregate</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.core.Sort)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/core/Sort.html" title="class in org.apache.calcite.rel.core">Sort</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalFilter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalFilter.html" title="class in org.apache.calcite.rel.logical">LogicalFilter</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalJoin)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalJoin.html" title="class in org.apache.calcite.rel.logical">LogicalJoin</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalCorrelate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalCorrelate.html" title="class in org.apache.calcite.rel.logical">LogicalCorrelate</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.core.Collect)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/core/Collect.html" title="class in org.apache.calcite.rel.core">Collect</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.core.Uncollect)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/core/Uncollect.html" title="class in org.apache.calcite.rel.core">Uncollect</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalIntersect)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalIntersect.html" title="class in org.apache.calcite.rel.logical">LogicalIntersect</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalMinus)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalMinus.html" title="class in org.apache.calcite.rel.logical">LogicalMinus</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalUnion)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalUnion.html" title="class in org.apache.calcite.rel.logical">LogicalUnion</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalValues)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalValues.html" title="class in org.apache.calcite.rel.logical">LogicalValues</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalTableFunctionScan)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalTableFunctionScan.html" title="class in org.apache.calcite.rel.logical">LogicalTableFunctionScan</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.core.Sample)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/core/Sample.html" title="class in org.apache.calcite.rel.core">Sample</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalProject)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical">LogicalProject</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalCalc)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalCalc.html" title="class in org.apache.calcite.rel.logical">LogicalCalc</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.SelfFlatteningRel)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="RelStructuredTypeFlattener.SelfFlatteningRel.html" title="interface in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.SelfFlatteningRel</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteGeneric(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteGeneric</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteGeneric&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="flattenProjections(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.RewriteRexShuttle,java.util.List,java.util.List,java.lang.String,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenProjections</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;flattenProjections&#8203;(<a href="RelStructuredTypeFlattener.RewriteRexShuttle.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRexShuttle</a>&nbsp;shuttle,
java.util.List&lt;? extends <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;exps,
java.util.List&lt;java.lang.String&gt;&nbsp;fieldNames,
java.lang.String&nbsp;prefix,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</pre>
</li>
</ul>
<a id="flattenProjection(org.apache.calcite.sql2rel.RelStructuredTypeFlattener.RewriteRexShuttle,org.apache.calcite.rex.RexNode,java.lang.String,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenProjection</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;flattenProjection&#8203;(<a href="RelStructuredTypeFlattener.RewriteRexShuttle.html" title="class in org.apache.calcite.sql2rel">RelStructuredTypeFlattener.RewriteRexShuttle</a>&nbsp;shuttle,
<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;exp,
java.lang.String&nbsp;fieldName,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</pre>
</li>
</ul>
<a id="flattenNullLiteral(org.apache.calcite.rel.type.RelDataType,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenNullLiteral</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;flattenNullLiteral&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;type,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExps)</pre>
</li>
</ul>
<a id="isConstructor(org.apache.calcite.rex.RexNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConstructor</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;isConstructor&#8203;(<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;rexNode)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.core.TableScan)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core">TableScan</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalSnapshot)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalSnapshot.html" title="class in org.apache.calcite.rel.logical">LogicalSnapshot</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.stream.LogicalDelta)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/stream/LogicalDelta.html" title="class in org.apache.calcite.rel.stream">LogicalDelta</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.stream.LogicalChi)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/stream/LogicalChi.html" title="class in org.apache.calcite.rel.stream">LogicalChi</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="rewriteRel(org.apache.calcite.rel.logical.LogicalMatch)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewriteRel</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;rewriteRel&#8203;(<a href="../rel/logical/LogicalMatch.html" title="class in org.apache.calcite.rel.logical">LogicalMatch</a>&nbsp;rel)</pre>
</li>
</ul>
<a id="flattenInputs(java.util.List,org.apache.calcite.rex.RexNode,java.util.List)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>flattenInputs</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;flattenInputs&#8203;(java.util.List&lt;<a href="../rel/type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;fieldList,
<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;prefix,
java.util.List&lt;<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a>&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,&#8203;java.lang.String&gt;&gt;&nbsp;flattenedExpList)</pre>
<div class="block">Generates expressions that reference the flattened input fields from
a given row type.</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/RelStructuredTypeFlattener.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>