blob: bbd05c4e004f847fbc4dbb98b63331f40622925e [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>LoptOptimizeJoinRule (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="LoptOptimizeJoinRule (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"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":9,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/LoptOptimizeJoinRule.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.rel.rules</a></div>
<h2 title="Class LoptOptimizeJoinRule" class="title">Class LoptOptimizeJoinRule</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../plan/RelOptRule.html" title="class in org.apache.calcite.plan">org.apache.calcite.plan.RelOptRule</a></li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.rel.rules.LoptOptimizeJoinRule</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">LoptOptimizeJoinRule</span>
extends <a href="../../plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></pre>
<div class="block">Planner rule that implements the heuristic planner for determining optimal
join orderings.
<p>It is triggered by the pattern
<a href="../logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical"><code>LogicalProject</code></a>
(<a href="MultiJoin.html" title="class in org.apache.calcite.rel.rules"><code>MultiJoin</code></a>).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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>static <a href="LoptOptimizeJoinRule.html" title="class in org.apache.calcite.rel.rules">LoptOptimizeJoinRule</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INSTANCE">INSTANCE</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.plan.RelOptRule">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.plan.<a href="../../plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></h3>
<code><a href="../../plan/RelOptRule.html#description">description</a>, <a href="../../plan/RelOptRule.html#operands">operands</a>, <a href="../../plan/RelOptRule.html#relBuilderFactory">relBuilderFactory</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.core.RelFactories.JoinFactory,org.apache.calcite.rel.core.RelFactories.ProjectFactory,org.apache.calcite.rel.core.RelFactories.FilterFactory)">LoptOptimizeJoinRule</a></span>&#8203;(<a href="../core/RelFactories.JoinFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.JoinFactory</a>&nbsp;joinFactory,
<a href="../core/RelFactories.ProjectFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.ProjectFactory</a>&nbsp;projectFactory,
<a href="../core/RelFactories.FilterFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.FilterFactory</a>&nbsp;filterFactory)</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.RelBuilderFactory)">LoptOptimizeJoinRule</a></span>&#8203;(<a href="../../tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a>&nbsp;relBuilderFactory)</code></th>
<td class="colLast">
<div class="block">Creates a LoptOptimizeJoinRule.</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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 void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addAdditionalFilters(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">addAdditionalFilters</a></span>&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</code></th>
<td class="colLast">
<div class="block">Determines whether any additional filters are applicable to a join tree.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addFactorToTree(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.BitSet,java.util.List,boolean)">addFactorToTree</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.BitSet&nbsp;factorsNeeded,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Adds a new factor into the current join tree.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<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="#addFilters(org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,int,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List,boolean)">addFilters</a></span>&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;leftTree,
int&nbsp;leftIdx,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;rightTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;adjust)</code></th>
<td class="colLast">
<div class="block">Determines which join filters can be added to the current join tree.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addToTop(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.List,boolean)">addToTop</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Creates a join tree with the new factor added to the top of the tree</div>
</td>
</tr>
<tr id="i4" class="altColor">
<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="#adjustFilter(org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode,int,java.util.List,java.util.List)">adjustFilter</a></span>&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition,
int&nbsp;factorAdded,
java.util.List&lt;java.lang.Integer&gt;&nbsp;origJoinOrder,
java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;origFields)</code></th>
<td class="colLast">
<div class="block">Adjusts a filter to reflect a newly added factor in the middle of an
existing join tree</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#areSelfJoinKeysUnique(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.rex.RexNode)">areSelfJoinKeysUnique</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;leftRel,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rightRel,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;joinFilters)</code></th>
<td class="colLast">
<div class="block">Determines if the equality portion of a self-join condition is between
identical keys that are unique.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>private java.lang.Double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#computeJoinCardinality(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List,int)">computeJoinCardinality</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filters,
int&nbsp;factor)</code></th>
<td class="colLast">
<div class="block">Computes the cardinality of the join columns from a particular factor,
when that factor is joined with another join tree.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createJoinSubtree(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.core.JoinRelType,java.util.List,boolean,boolean)">createJoinSubtree</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition,
<a href="../core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a>&nbsp;joinType,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;fullAdjust,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Creates a LogicalJoin given left and right operands and a join condition.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,int)">createOrdering</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
int&nbsp;firstFactor)</code></th>
<td class="colLast">
<div class="block">Generates a join tree with a specific factor as the first factor in the
join tree</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createReplacementJoin(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,int,org.apache.calcite.util.ImmutableIntList,java.lang.Integer%5B%5D,java.util.List)">createReplacementJoin</a></span>&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;currJoinTree,
int&nbsp;leftIdx,
int&nbsp;factorToAdd,
<a href="../../util/ImmutableIntList.html" title="class in org.apache.calcite.util">ImmutableIntList</a>&nbsp;newKeys,
java.lang.Integer[]&nbsp;replacementKeys,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</code></th>
<td class="colLast">
<div class="block">Creates a replacement join, projecting either dummy columns or
replacement keys from the factor that doesn't actually need to be joined.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createReplacementSemiJoin(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.List)">createReplacementSemiJoin</a></span>&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;factTree,
int&nbsp;dimIdx,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</code></th>
<td class="colLast">
<div class="block">In the event that a dimension table does not need to be joined because of
a semijoin, this method creates a join tree that consists of a projection
on top of an existing join tree.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>private <a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTopProject(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">createTopProject</a></span>&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;java.lang.String&gt;&nbsp;fieldNames)</code></th>
<td class="colLast">
<div class="block">Creates the topmost projection that will sit on top of the selected join
ordering.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findBestOrderings(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.plan.RelOptRuleCall)">findBestOrderings</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="../../plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a>&nbsp;call)</code></th>
<td class="colLast">
<div class="block">Generates N optimal join orderings.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findRemovableOuterJoins(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">findRemovableOuterJoins</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</code></th>
<td class="colLast">
<div class="block">Locates all null generating factors whose outer join can be removed.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findRemovableSelfJoins(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">findRemovableSelfJoins</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</code></th>
<td class="colLast">
<div class="block">Locates pairs of joins that are self-joins where the join can be removed
because the join condition between the two factors is an equality join on
unique keys.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBestNextFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,java.util.BitSet,java.util.BitSet,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">getBestNextFactor</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
java.util.BitSet&nbsp;factorsToAdd,
java.util.BitSet&nbsp;factorsAdded,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</code></th>
<td class="colLast">
<div class="block">Determines the best factor to be added next into a join tree.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>private java.util.Map&lt;java.lang.Integer,&#8203;<a href="../../plan/RelOptTable.html" title="interface in org.apache.calcite.plan">RelOptTable</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSimpleFactors(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">getSimpleFactors</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</code></th>
<td class="colLast">
<div class="block">Retrieves join factors that correspond to simple table references.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isJoinTree(org.apache.calcite.rel.RelNode)">isJoinTree</a></span>&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel)</code></th>
<td class="colLast">
<div class="block">Returns whether a RelNode corresponds to a Join that wasn't one of the
original MultiJoin input factors.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRemovableSelfJoin(org.apache.calcite.rel.core.Join)">isRemovableSelfJoin</a></span>&#8203;(<a href="../core/Join.html" title="class in org.apache.calcite.rel.core">Join</a>&nbsp;joinRel)</code></th>
<td class="colLast">
<div class="block">Determines whether a join is a removable self-join.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSelfJoinFilterUnique(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,int,int,java.util.List)">isSelfJoinFilterUnique</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int&nbsp;leftFactor,
int&nbsp;rightFactor,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;joinFilterList)</code></th>
<td class="colLast">
<div class="block">Determines if the equality join filters between two factors that map to
the same table consist of unique, identical keys.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#needsAdjustment(org.apache.calcite.rel.rules.LoptMultiJoin,int%5B%5D,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,boolean)">needsAdjustment</a></span>&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int[]&nbsp;adjustments,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;otherTree,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Sets an array indicating how much each factor in a join tree needs to be
adjusted to reflect the tree's join ordering</div>
</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="#onMatch(org.apache.calcite.plan.RelOptRuleCall)">onMatch</a></span>&#8203;(<a href="../../plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a>&nbsp;call)</code></th>
<td class="colLast">
<div class="block">Receives notification about a rule match.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>private <a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pushDownFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.BitSet,java.util.List,boolean)">pushDownFactor</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.BitSet&nbsp;factorsNeeded,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Creates a join tree where the new factor is pushed down one of the
operands of the current join tree</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remapJoinReferences(org.apache.calcite.rel.rules.LoptMultiJoin,int,java.util.List,int,int%5B%5D,int,int,boolean)">remapJoinReferences</a></span>&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int&nbsp;factor,
java.util.List&lt;java.lang.Integer&gt;&nbsp;newJoinOrder,
int&nbsp;newPos,
int[]&nbsp;adjustments,
int&nbsp;offset,
int&nbsp;newOffset,
boolean&nbsp;alwaysUseDefault)</code></th>
<td class="colLast">
<div class="block">Sets an adjustment array based on where column references for a
particular factor end up as a result of a new join ordering.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rowWidthCost(org.apache.calcite.rel.RelNode)">rowWidthCost</a></span>&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;tree)</code></th>
<td class="colLast">
<div class="block">Computes a cost for a join tree based on the row widths of the inputs
into the join.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFactorJoinKeys(org.apache.calcite.rel.rules.LoptMultiJoin,java.util.List,org.apache.calcite.util.ImmutableBitSet,int,int,org.apache.calcite.util.ImmutableBitSet.Builder)">setFactorJoinKeys</a></span>&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filters,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;joinFactors,
int&nbsp;factorStart,
int&nbsp;nFields,
<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;joinKeys)</code></th>
<td class="colLast">
<div class="block">Locates from a list of filters those that correspond to a particular join
tree.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>private void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setJoinKey(org.apache.calcite.util.ImmutableBitSet.Builder,org.apache.calcite.util.ImmutableBitSet.Builder,int,int,int,int,boolean)">setJoinKey</a></span>&#8203;(<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;joinKeys,
<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;otherJoinKeys,
int&nbsp;ref1,
int&nbsp;ref2,
int&nbsp;firstFieldNum,
int&nbsp;lastFieldNum,
boolean&nbsp;swap)</code></th>
<td class="colLast">
<div class="block">Sets a join key if only one of the specified input references corresponds
to a specified factor as determined by its field numbers.</div>
</td>
</tr>
<tr id="i27" 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="#swapFilter(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode)">swapFilter</a></span>&#8203;(<a href="../../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;origLeft,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;origRight,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition)</code></th>
<td class="colLast">
<div class="block">Adjusts a filter to reflect swapping of join inputs</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#swapInputs(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,boolean)">swapInputs</a></span>&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
boolean&nbsp;selfJoin)</code></th>
<td class="colLast">
<div class="block">Swaps the operands to a join, so the smaller input is on the right.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.plan.RelOptRule">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.plan.<a href="../../plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></h3>
<code><a href="../../plan/RelOptRule.html#any()">any</a>, <a href="../../plan/RelOptRule.html#convert(org.apache.calcite.rel.RelNode,org.apache.calcite.plan.RelTrait)">convert</a>, <a href="../../plan/RelOptRule.html#convert(org.apache.calcite.rel.RelNode,org.apache.calcite.plan.RelTraitSet)">convert</a>, <a href="../../plan/RelOptRule.html#convertList(java.util.List,org.apache.calcite.plan.RelTrait)">convertList</a>, <a href="../../plan/RelOptRule.html#convertOperand(java.lang.Class,com.google.common.base.Predicate,org.apache.calcite.plan.RelTrait)">convertOperand</a>, <a href="../../plan/RelOptRule.html#convertOperand(java.lang.Class,java.util.function.Predicate,org.apache.calcite.plan.RelTrait)">convertOperand</a>, <a href="../../plan/RelOptRule.html#equals(java.lang.Object)">equals</a>, <a href="../../plan/RelOptRule.html#equals(org.apache.calcite.plan.RelOptRule)">equals</a>, <a href="../../plan/RelOptRule.html#getOperand()">getOperand</a>, <a href="../../plan/RelOptRule.html#getOperands()">getOperands</a>, <a href="../../plan/RelOptRule.html#getOutConvention()">getOutConvention</a>, <a href="../../plan/RelOptRule.html#getOutTrait()">getOutTrait</a>, <a href="../../plan/RelOptRule.html#hashCode()">hashCode</a>, <a href="../../plan/RelOptRule.html#matches(org.apache.calcite.plan.RelOptRuleCall)">matches</a>, <a href="../../plan/RelOptRule.html#none()">none</a>, <a href="../../plan/RelOptRule.html#operand(java.lang.Class,org.apache.calcite.plan.RelOptRuleOperandChildren)">operand</a>, <a href="../../plan/RelOptRule.html#operand(java.lang.Class,org.apache.calcite.plan.RelOptRuleOperand,org.apache.calcite.plan.RelOptRuleOperand...)">operand</a>, <a href="../../plan/RelOptRule.html#operand(java.lang.Class,org.apache.calcite.plan.RelTrait,com.google.common.base.Predicate,org.apache.calcite.plan.RelOptRuleOperandChildren)">operand</a>, <a href="../../plan/RelOptRule.html#operand(java.lang.Class,org.apache.calcite.plan.RelTrait,com.google.common.base.Predicate,org.apache.calcite.plan.RelOptRuleOperand,org.apache.calcite.plan.RelOptRuleOperand...)">operand</a>, <a href="../../plan/RelOptRule.html#operand(java.lang.Class,org.apache.calcite.plan.RelTrait,org.apache.calcite.plan.RelOptRuleOperandChildren)">operand</a>, <a href="../../plan/RelOptRule.html#operandJ(java.lang.Class,org.apache.calcite.plan.RelTrait,java.util.function.Predicate,org.apache.calcite.plan.RelOptRuleOperandChildren)">operandJ</a>, <a href="../../plan/RelOptRule.html#operandJ(java.lang.Class,org.apache.calcite.plan.RelTrait,java.util.function.Predicate,org.apache.calcite.plan.RelOptRuleOperand,org.apache.calcite.plan.RelOptRuleOperand...)">operandJ</a>, <a href="../../plan/RelOptRule.html#some(org.apache.calcite.plan.RelOptRuleOperand,org.apache.calcite.plan.RelOptRuleOperand...)">some</a>, <a href="../../plan/RelOptRule.html#toString()">toString</a>, <a href="../../plan/RelOptRule.html#unordered(org.apache.calcite.plan.RelOptRuleOperand,org.apache.calcite.plan.RelOptRuleOperand...)">unordered</a></code></li>
</ul>
<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, finalize, getClass, notify, notifyAll, 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="INSTANCE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>INSTANCE</h4>
<pre>public static final&nbsp;<a href="LoptOptimizeJoinRule.html" title="class in org.apache.calcite.rel.rules">LoptOptimizeJoinRule</a> INSTANCE</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.tools.RelBuilderFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LoptOptimizeJoinRule</h4>
<pre>public&nbsp;LoptOptimizeJoinRule&#8203;(<a href="../../tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a>&nbsp;relBuilderFactory)</pre>
<div class="block">Creates a LoptOptimizeJoinRule.</div>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.rel.core.RelFactories.JoinFactory,org.apache.calcite.rel.core.RelFactories.ProjectFactory,org.apache.calcite.rel.core.RelFactories.FilterFactory)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LoptOptimizeJoinRule</h4>
<pre>@Deprecated
public&nbsp;LoptOptimizeJoinRule&#8203;(<a href="../core/RelFactories.JoinFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.JoinFactory</a>&nbsp;joinFactory,
<a href="../core/RelFactories.ProjectFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.ProjectFactory</a>&nbsp;projectFactory,
<a href="../core/RelFactories.FilterFactory.html" title="interface in org.apache.calcite.rel.core">RelFactories.FilterFactory</a>&nbsp;filterFactory)</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="onMatch(org.apache.calcite.plan.RelOptRuleCall)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onMatch</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onMatch&#8203;(<a href="../../plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a>&nbsp;call)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../plan/RelOptRule.html#onMatch(org.apache.calcite.plan.RelOptRuleCall)">RelOptRule</a></code></span></div>
<div class="block">Receives notification about a rule match. At the time that this method is
called, <a href="../../plan/RelOptRuleCall.html#rels"><code>call.rels</code></a> holds the set of relational
expressions which match the operands to the rule; <code>
call.rels[0]</code> is the root expression.
<p>Typically a rule would check that the nodes are valid matches, creates
a new expression, then calls back <a href="../../plan/RelOptRuleCall.html#transformTo(org.apache.calcite.rel.RelNode,java.util.Map)"><code>RelOptRuleCall.transformTo(org.apache.calcite.rel.RelNode, java.util.Map&lt;org.apache.calcite.rel.RelNode, org.apache.calcite.rel.RelNode&gt;)</code></a> to
register the expression.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../plan/RelOptRule.html#onMatch(org.apache.calcite.plan.RelOptRuleCall)">onMatch</a></code>&nbsp;in class&nbsp;<code><a href="../../plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>call</code> - Rule call</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../plan/RelOptRule.html#matches(org.apache.calcite.plan.RelOptRuleCall)"><code>RelOptRule.matches(RelOptRuleCall)</code></a></dd>
</dl>
</li>
</ul>
<a id="findRemovableOuterJoins(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findRemovableOuterJoins</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;findRemovableOuterJoins&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</pre>
<div class="block">Locates all null generating factors whose outer join can be removed. The
outer join can be removed if the join keys corresponding to the null
generating factor are unique and no columns are projected from it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
</dl>
</li>
</ul>
<a id="setJoinKey(org.apache.calcite.util.ImmutableBitSet.Builder,org.apache.calcite.util.ImmutableBitSet.Builder,int,int,int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJoinKey</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;setJoinKey&#8203;(<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;joinKeys,
<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;otherJoinKeys,
int&nbsp;ref1,
int&nbsp;ref2,
int&nbsp;firstFieldNum,
int&nbsp;lastFieldNum,
boolean&nbsp;swap)</pre>
<div class="block">Sets a join key if only one of the specified input references corresponds
to a specified factor as determined by its field numbers. Also keeps
track of the keys from the other factor.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>joinKeys</code> - join keys to be set if a key is found</dd>
<dd><code>otherJoinKeys</code> - join keys for the other join factor</dd>
<dd><code>ref1</code> - first input reference</dd>
<dd><code>ref2</code> - second input reference</dd>
<dd><code>firstFieldNum</code> - first field number of the factor</dd>
<dd><code>lastFieldNum</code> - last field number + 1 of the factor</dd>
<dd><code>swap</code> - if true, check for the desired input reference in the second
input reference parameter if the first input reference isn't the correct
one</dd>
</dl>
</li>
</ul>
<a id="findRemovableSelfJoins(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findRemovableSelfJoins</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;findRemovableSelfJoins&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</pre>
<div class="block">Locates pairs of joins that are self-joins where the join can be removed
because the join condition between the two factors is an equality join on
unique keys.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
</dl>
</li>
</ul>
<a id="getSimpleFactors(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSimpleFactors</h4>
<pre class="methodSignature">private&nbsp;java.util.Map&lt;java.lang.Integer,&#8203;<a href="../../plan/RelOptTable.html" title="interface in org.apache.calcite.plan">RelOptTable</a>&gt;&nbsp;getSimpleFactors&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin)</pre>
<div class="block">Retrieves join factors that correspond to simple table references. A
simple table reference is a single table reference with no grouping or
aggregation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>map consisting of the simple factors and the tables they
correspond</dd>
</dl>
</li>
</ul>
<a id="isSelfJoinFilterUnique(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,int,int,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSelfJoinFilterUnique</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;isSelfJoinFilterUnique&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int&nbsp;leftFactor,
int&nbsp;rightFactor,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;joinFilterList)</pre>
<div class="block">Determines if the equality join filters between two factors that map to
the same table consist of unique, identical keys.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>leftFactor</code> - left factor in the join</dd>
<dd><code>rightFactor</code> - right factor in the join</dd>
<dd><code>joinFilterList</code> - list of join filters between the two factors</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the criteria are met</dd>
</dl>
</li>
</ul>
<a id="findBestOrderings(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.plan.RelOptRuleCall)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findBestOrderings</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;findBestOrderings&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="../../plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a>&nbsp;call)</pre>
<div class="block">Generates N optimal join orderings. Each ordering contains each factor as
the first factor in the ordering.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>call</code> - RelOptRuleCall associated with this rule</dd>
</dl>
</li>
</ul>
<a id="createTopProject(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTopProject</h4>
<pre class="methodSignature">private&nbsp;<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;createTopProject&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;java.lang.String&gt;&nbsp;fieldNames)</pre>
<div class="block">Creates the topmost projection that will sit on top of the selected join
ordering. The projection needs to match the original join ordering. Also,
places any post-join filters on top of the project.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>joinTree</code> - selected join ordering</dd>
<dd><code>fieldNames</code> - field names corresponding to the projection expressions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>created projection</dd>
</dl>
</li>
</ul>
<a id="computeJoinCardinality(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>computeJoinCardinality</h4>
<pre class="methodSignature">private&nbsp;java.lang.Double&nbsp;computeJoinCardinality&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filters,
int&nbsp;factor)</pre>
<div class="block">Computes the cardinality of the join columns from a particular factor,
when that factor is joined with another join tree.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins chosen for each factor</dd>
<dd><code>joinTree</code> - the join tree that the factor is being joined with</dd>
<dd><code>filters</code> - possible join filters to select from</dd>
<dd><code>factor</code> - the factor being added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>computed cardinality</dd>
</dl>
</li>
</ul>
<a id="setFactorJoinKeys(org.apache.calcite.rel.rules.LoptMultiJoin,java.util.List,org.apache.calcite.util.ImmutableBitSet,int,int,org.apache.calcite.util.ImmutableBitSet.Builder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFactorJoinKeys</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;setFactorJoinKeys&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filters,
<a href="../../util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a>&nbsp;joinFactors,
int&nbsp;factorStart,
int&nbsp;nFields,
<a href="../../util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a>&nbsp;joinKeys)</pre>
<div class="block">Locates from a list of filters those that correspond to a particular join
tree. Then, for each of those filters, extracts the fields corresponding
to a particular factor, setting them in a bitmap.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>filters</code> - list of join filters</dd>
<dd><code>joinFactors</code> - bitmap containing the factors in a particular join
tree</dd>
<dd><code>factorStart</code> - the initial offset of the factor whose join keys will
be extracted</dd>
<dd><code>nFields</code> - the number of fields in the factor whose join keys will be
extracted</dd>
<dd><code>joinKeys</code> - the bitmap that will be set with the join keys</dd>
</dl>
</li>
</ul>
<a id="createOrdering(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createOrdering</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;createOrdering&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
int&nbsp;firstFactor)</pre>
<div class="block">Generates a join tree with a specific factor as the first factor in the
join tree</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>firstFactor</code> - first factor in the tree</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>constructed join tree or null if it is not possible for
firstFactor to appear as the first factor in the join</dd>
</dl>
</li>
</ul>
<a id="getBestNextFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,java.util.BitSet,java.util.BitSet,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBestNextFactor</h4>
<pre class="methodSignature">private&nbsp;int&nbsp;getBestNextFactor&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
java.util.BitSet&nbsp;factorsToAdd,
java.util.BitSet&nbsp;factorsAdded,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</pre>
<div class="block">Determines the best factor to be added next into a join tree.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>factorsToAdd</code> - factors to choose from to add next</dd>
<dd><code>factorsAdded</code> - factors that have already been added to the join tree</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>joinTree</code> - join tree constructed thus far</dd>
<dd><code>filtersToAdd</code> - remaining filters that need to be added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>index of the best factor to add next</dd>
</dl>
</li>
</ul>
<a id="isJoinTree(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJoinTree</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;isJoinTree&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rel)</pre>
<div class="block">Returns whether a RelNode corresponds to a Join that wasn't one of the
original MultiJoin input factors.</div>
</li>
</ul>
<a id="addFactorToTree(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.BitSet,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFactorToTree</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;addFactorToTree&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.BitSet&nbsp;factorsNeeded,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</pre>
<div class="block">Adds a new factor into the current join tree. The factor is either pushed
down into one of the subtrees of the join recursively, or it is added to
the top of the current tree, whichever yields a better ordering.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>joinTree</code> - current join tree</dd>
<dd><code>factorToAdd</code> - new factor to be added</dd>
<dd><code>factorsNeeded</code> - factors that must precede the factor to be added</dd>
<dd><code>filtersToAdd</code> - filters remaining to be added; filters added to the
new join tree are removed from the list</dd>
<dd><code>selfJoin</code> - true if the join being created is a self-join that's
removable</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>optimal join tree with the new factor added if it is possible to
add the factor; otherwise, null is returned</dd>
</dl>
</li>
</ul>
<a id="rowWidthCost(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rowWidthCost</h4>
<pre class="methodSignature">private&nbsp;int&nbsp;rowWidthCost&#8203;(<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;tree)</pre>
<div class="block">Computes a cost for a join tree based on the row widths of the inputs
into the join. Joins where the inputs have the fewest number of columns
lower in the tree are better than equivalent joins where the inputs with
the larger number of columns are lower in the tree.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tree</code> - a tree of RelNodes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the cost associated with the width of the tree</dd>
</dl>
</li>
</ul>
<a id="pushDownFactor(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.BitSet,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pushDownFactor</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;pushDownFactor&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.BitSet&nbsp;factorsNeeded,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</pre>
<div class="block">Creates a join tree where the new factor is pushed down one of the
operands of the current join tree</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>joinTree</code> - current join tree</dd>
<dd><code>factorToAdd</code> - new factor to be added</dd>
<dd><code>factorsNeeded</code> - factors that must precede the factor to be added</dd>
<dd><code>filtersToAdd</code> - filters remaining to be added; filters that are added
to the join tree are removed from the list</dd>
<dd><code>selfJoin</code> - true if the factor being added is part of a removable
self-join</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>optimal join tree with the new factor pushed down the current
join tree if it is possible to do the pushdown; otherwise, null is
returned</dd>
</dl>
</li>
</ul>
<a id="addToTop(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addToTop</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;addToTop&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
int&nbsp;factorToAdd,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;selfJoin)</pre>
<div class="block">Creates a join tree with the new factor added to the top of the tree</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>joinTree</code> - current join tree</dd>
<dd><code>factorToAdd</code> - new factor to be added</dd>
<dd><code>filtersToAdd</code> - filters remaining to be added; modifies the list to
remove filters that can be added to the join tree</dd>
<dd><code>selfJoin</code> - true if the join being created is a self-join that's
removable</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>new join tree</dd>
</dl>
</li>
</ul>
<a id="addFilters(org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,int,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFilters</h4>
<pre class="methodSignature">private&nbsp;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;addFilters&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;leftTree,
int&nbsp;leftIdx,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;rightTree,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;adjust)</pre>
<div class="block">Determines which join filters can be added to the current join tree. Note
that the join filter still reflects the original join ordering. It will
only be adjusted to reflect the new join ordering if the "adjust"
parameter is set to true.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>leftTree</code> - left subtree of the join tree</dd>
<dd><code>leftIdx</code> - if &ge; 0, only consider filters that reference leftIdx in
leftTree; otherwise, consider all filters that reference any factor in
leftTree</dd>
<dd><code>rightTree</code> - right subtree of the join tree</dd>
<dd><code>filtersToAdd</code> - remaining join filters that need to be added; those
that are added are removed from the list</dd>
<dd><code>adjust</code> - if true, adjust filter to reflect new join ordering</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>AND'd expression of the join filters that can be added to the
current join tree</dd>
</dl>
</li>
</ul>
<a id="adjustFilter(org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode,int,java.util.List,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adjustFilter</h4>
<pre class="methodSignature">private&nbsp;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;adjustFilter&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition,
int&nbsp;factorAdded,
java.util.List&lt;java.lang.Integer&gt;&nbsp;origJoinOrder,
java.util.List&lt;<a href="../type/RelDataTypeField.html" title="interface in org.apache.calcite.rel.type">RelDataTypeField</a>&gt;&nbsp;origFields)</pre>
<div class="block">Adjusts a filter to reflect a newly added factor in the middle of an
existing join tree</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>left</code> - left subtree of the join</dd>
<dd><code>right</code> - right subtree of the join</dd>
<dd><code>condition</code> - current join condition</dd>
<dd><code>factorAdded</code> - index corresponding to the newly added factor</dd>
<dd><code>origJoinOrder</code> - original join order, before factor was pushed into
the tree</dd>
<dd><code>origFields</code> - fields from the original join before the factor was
added</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>modified join condition reflecting addition of the new factor</dd>
</dl>
</li>
</ul>
<a id="remapJoinReferences(org.apache.calcite.rel.rules.LoptMultiJoin,int,java.util.List,int,int[],int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remapJoinReferences</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;remapJoinReferences&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int&nbsp;factor,
java.util.List&lt;java.lang.Integer&gt;&nbsp;newJoinOrder,
int&nbsp;newPos,
int[]&nbsp;adjustments,
int&nbsp;offset,
int&nbsp;newOffset,
boolean&nbsp;alwaysUseDefault)</pre>
<div class="block">Sets an adjustment array based on where column references for a
particular factor end up as a result of a new join ordering.
<p>If the factor is not the right factor in a removable self-join, then
it needs to be adjusted as follows:
<ul>
<li>First subtract, based on where the factor was in the original join
ordering.
<li>Then add on the number of fields in the factors that now precede this
factor in the new join ordering.
</ul>
<p>If the factor is the right factor in a removable self-join and its
column reference can be mapped to the left factor in the self-join, then:
<ul>
<li>First subtract, based on where the column reference is in the new
join ordering.
<li>Then, add on the number of fields up to the start of the left factor
in the self-join in the new join ordering.
<li>Then, finally add on the offset of the corresponding column from the
left factor.
</ul>
<p>Note that this only applies if both factors in the self-join are in the
join ordering. If they are, then the left factor always precedes the
right factor in the join ordering.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>factor</code> - the factor whose references are being adjusted</dd>
<dd><code>newJoinOrder</code> - the new join ordering containing the factor</dd>
<dd><code>newPos</code> - the position of the factor in the new join ordering</dd>
<dd><code>adjustments</code> - the adjustments array that will be set</dd>
<dd><code>offset</code> - the starting offset within the original join ordering for
the columns of the factor being adjusted</dd>
<dd><code>newOffset</code> - the new starting offset in the new join ordering for the
columns of the factor being adjusted</dd>
<dd><code>alwaysUseDefault</code> - always use the default adjustment value
regardless of whether the factor is the right factor in a removable
self-join</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if at least one column from the factor requires adjustment</dd>
</dl>
</li>
</ul>
<a id="createReplacementSemiJoin(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createReplacementSemiJoin</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;createReplacementSemiJoin&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;factTree,
int&nbsp;dimIdx,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</pre>
<div class="block">In the event that a dimension table does not need to be joined because of
a semijoin, this method creates a join tree that consists of a projection
on top of an existing join tree. The existing join tree must contain the
fact table in the semijoin that allows the dimension table to be removed.
<p>The projection created on top of the join tree mimics a join of the
fact and dimension tables. In order for the dimension table to have been
removed, the only fields referenced from the dimension table are its
dimension keys. Therefore, we can replace these dimension fields with the
fields corresponding to the semijoin keys from the fact table in the
projection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>factTree</code> - existing join tree containing the fact table</dd>
<dd><code>dimIdx</code> - dimension table factor id</dd>
<dd><code>filtersToAdd</code> - filters remaining to be added; filters added to the
new join tree are removed from the list</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>created join tree or null if the corresponding fact table has not
been joined in yet</dd>
</dl>
</li>
</ul>
<a id="createReplacementJoin(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptSemiJoinOptimizer,org.apache.calcite.rel.rules.LoptJoinTree,int,int,org.apache.calcite.util.ImmutableIntList,java.lang.Integer[],java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createReplacementJoin</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;createReplacementJoin&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptSemiJoinOptimizer.html" title="class in org.apache.calcite.rel.rules">LoptSemiJoinOptimizer</a>&nbsp;semiJoinOpt,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;currJoinTree,
int&nbsp;leftIdx,
int&nbsp;factorToAdd,
<a href="../../util/ImmutableIntList.html" title="class in org.apache.calcite.util">ImmutableIntList</a>&nbsp;newKeys,
java.lang.Integer[]&nbsp;replacementKeys,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</pre>
<div class="block">Creates a replacement join, projecting either dummy columns or
replacement keys from the factor that doesn't actually need to be joined.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>semiJoinOpt</code> - optimal semijoins for each factor</dd>
<dd><code>currJoinTree</code> - current join tree being added to</dd>
<dd><code>leftIdx</code> - if &ge; 0, when creating the replacement join, only consider
filters that reference leftIdx in currJoinTree; otherwise, consider all
filters that reference any factor in currJoinTree</dd>
<dd><code>factorToAdd</code> - new factor whose join can be removed</dd>
<dd><code>newKeys</code> - join keys that need to be replaced</dd>
<dd><code>replacementKeys</code> - the keys that replace the join keys; null if we're
removing the null generating factor in an outer join</dd>
<dd><code>filtersToAdd</code> - filters remaining to be added; filters added to the
new join tree are removed from the list</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>created join tree with an appropriate projection for the factor
that can be removed</dd>
</dl>
</li>
</ul>
<a id="createJoinSubtree(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.core.JoinRelType,java.util.List,boolean,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createJoinSubtree</h4>
<pre class="methodSignature">private&nbsp;<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;createJoinSubtree&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition,
<a href="../core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a>&nbsp;joinType,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd,
boolean&nbsp;fullAdjust,
boolean&nbsp;selfJoin)</pre>
<div class="block">Creates a LogicalJoin given left and right operands and a join condition.
Swaps the operands if beneficial.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>left</code> - left operand</dd>
<dd><code>right</code> - right operand</dd>
<dd><code>condition</code> - join condition</dd>
<dd><code>joinType</code> - the join type</dd>
<dd><code>fullAdjust</code> - true if the join condition reflects the original join
ordering and therefore has not gone through any type of adjustment yet;
otherwise, the condition has already been partially adjusted and only
needs to be further adjusted if swapping is done</dd>
<dd><code>filtersToAdd</code> - additional filters that may be added on top of the
resulting LogicalJoin, if the join is a left or right outer join</dd>
<dd><code>selfJoin</code> - true if the join being created is a self-join that's
removable</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>created LogicalJoin</dd>
</dl>
</li>
</ul>
<a id="addAdditionalFilters(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAdditionalFilters</h4>
<pre class="methodSignature">private&nbsp;void&nbsp;addAdditionalFilters&#8203;(<a href="../../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a>&nbsp;relBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
java.util.List&lt;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;&nbsp;filtersToAdd)</pre>
<div class="block">Determines whether any additional filters are applicable to a join tree.
If there are any, creates a filter node on top of the join tree with the
additional filters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>relBuilder</code> - Builder holding current join tree</dd>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>left</code> - left side of join tree</dd>
<dd><code>right</code> - right side of join tree</dd>
<dd><code>filtersToAdd</code> - remaining filters</dd>
</dl>
</li>
</ul>
<a id="swapInputs(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swapInputs</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;swapInputs&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;left,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;right,
boolean&nbsp;selfJoin)</pre>
<div class="block">Swaps the operands to a join, so the smaller input is on the right. Or,
if this is a removable self-join, swap so the factor that should be
preserved when the self-join is removed is put on the left.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>left</code> - left side of join tree</dd>
<dd><code>right</code> - right hand side of join tree</dd>
<dd><code>selfJoin</code> - true if the join is a removable self-join</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if swapping should be done</dd>
</dl>
</li>
</ul>
<a id="swapFilter(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rel.rules.LoptMultiJoin,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rex.RexNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swapFilter</h4>
<pre class="methodSignature">private&nbsp;<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;swapFilter&#8203;(<a href="../../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a>&nbsp;rexBuilder,
<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;origLeft,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;origRight,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;condition)</pre>
<div class="block">Adjusts a filter to reflect swapping of join inputs</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rexBuilder</code> - rexBuilder</dd>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>origLeft</code> - original LHS of the join tree (before swap)</dd>
<dd><code>origRight</code> - original RHS of the join tree (before swap)</dd>
<dd><code>condition</code> - original join condition</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>join condition reflect swap of join inputs</dd>
</dl>
</li>
</ul>
<a id="needsAdjustment(org.apache.calcite.rel.rules.LoptMultiJoin,int[],org.apache.calcite.rel.rules.LoptJoinTree,org.apache.calcite.rel.rules.LoptJoinTree,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>needsAdjustment</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;needsAdjustment&#8203;(<a href="LoptMultiJoin.html" title="class in org.apache.calcite.rel.rules">LoptMultiJoin</a>&nbsp;multiJoin,
int[]&nbsp;adjustments,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;joinTree,
<a href="LoptJoinTree.html" title="class in org.apache.calcite.rel.rules">LoptJoinTree</a>&nbsp;otherTree,
boolean&nbsp;selfJoin)</pre>
<div class="block">Sets an array indicating how much each factor in a join tree needs to be
adjusted to reflect the tree's join ordering</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>multiJoin</code> - join factors being optimized</dd>
<dd><code>adjustments</code> - array to be filled out</dd>
<dd><code>joinTree</code> - join tree</dd>
<dd><code>otherTree</code> - null unless joinTree only represents the left side of
the join tree</dd>
<dd><code>selfJoin</code> - true if no adjustments need to be made for self-joins</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if some adjustment is required; false otherwise</dd>
</dl>
</li>
</ul>
<a id="isRemovableSelfJoin(org.apache.calcite.rel.core.Join)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRemovableSelfJoin</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isRemovableSelfJoin&#8203;(<a href="../core/Join.html" title="class in org.apache.calcite.rel.core">Join</a>&nbsp;joinRel)</pre>
<div class="block">Determines whether a join is a removable self-join. It is if it's an
inner join between identical, simple factors and the equality portion of
the join condition consists of the same set of unique keys.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>joinRel</code> - the join</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the join is removable</dd>
</dl>
</li>
</ul>
<a id="areSelfJoinKeysUnique(org.apache.calcite.rel.metadata.RelMetadataQuery,org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,org.apache.calcite.rex.RexNode)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>areSelfJoinKeysUnique</h4>
<pre class="methodSignature">private static&nbsp;boolean&nbsp;areSelfJoinKeysUnique&#8203;(<a href="../metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a>&nbsp;mq,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;leftRel,
<a href="../RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rightRel,
<a href="../../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&nbsp;joinFilters)</pre>
<div class="block">Determines if the equality portion of a self-join condition is between
identical keys that are unique.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mq</code> - Metadata query</dd>
<dd><code>leftRel</code> - left side of the join</dd>
<dd><code>rightRel</code> - right side of the join</dd>
<dd><code>joinFilters</code> - the join condition</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the equality join keys are the same and unique</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LoptOptimizeJoinRule.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>Nested&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>