| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>SubstitutionVisitor (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="SubstitutionVisitor (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":9,"i3":9,"i4":9,"i5":9,"i6":10,"i7":10,"i8":10,"i9":9,"i10":10,"i11":10,"i12":9,"i13":9,"i14":9,"i15":9,"i16":10,"i17":9,"i18":9,"i19":9,"i20":10,"i21":9,"i22":9,"i23":9,"i24":9}; |
| 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/SubstitutionVisitor.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 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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"> </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> <a href="package-summary.html">org.apache.calcite.plan</a></div> |
| <h2 title="Class SubstitutionVisitor" class="title">Class SubstitutionVisitor</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.plan.SubstitutionVisitor</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="MaterializedViewSubstitutionVisitor.html" title="class in org.apache.calcite.plan">MaterializedViewSubstitutionVisitor</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">SubstitutionVisitor</span> |
| extends java.lang.Object</pre> |
| <div class="block">Substitutes part of a tree of relational expressions with another tree. |
| |
| <p>The call <code>new SubstitutionVisitor(target, query).go(replacement))</code> |
| will return <code>query</code> with every occurrence of <code>target</code> replaced |
| by <code>replacement</code>.</p> |
| |
| <p>The following example shows how <code>SubstitutionVisitor</code> can be used |
| for materialized view recognition.</p> |
| |
| <ul> |
| <li>query = SELECT a, c FROM t WHERE x = 5 AND b = 4</li> |
| <li>target = SELECT a, b, c FROM t WHERE x = 5</li> |
| <li>replacement = SELECT * FROM mv</li> |
| <li>result = SELECT a, c FROM mv WHERE b = 4</li> |
| </ul> |
| |
| <p>Note that <code>result</code> uses the materialized view table <code>mv</code> and a |
| simplified condition <code>b = 4</code>.</p> |
| |
| <p>Uses a bottom-up matching algorithm. Nodes do not need to be identical. |
| At each level, returns the residue.</p> |
| |
| <p>The inputs must only include the core relational operators: |
| <a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core"><code>TableScan</code></a>, |
| <a href="../rel/core/Filter.html" title="class in org.apache.calcite.rel.core"><code>Filter</code></a>, |
| <a href="../rel/core/Project.html" title="class in org.apache.calcite.rel.core"><code>Project</code></a>, |
| <a href="../rel/core/Join.html" title="class in org.apache.calcite.rel.core"><code>Join</code></a>, |
| <a href="../rel/core/Union.html" title="class in org.apache.calcite.rel.core"><code>Union</code></a>, |
| <a href="../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a>.</p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.AbstractUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.AbstractUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Abstract base class for implementing <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a |
| <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable"><code>MutableAggregate</code></a> on |
| a <a href="../rel/mutable/MutableProject.html" title="class in org.apache.calcite.rel.mutable"><code>MutableProject</code></a> query to an <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable"><code>MutableAggregate</code></a> target.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.AggregateToAggregateUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.AggregateToAggregateUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a |
| <a href="../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a> to a |
| <a href="../rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a>, provided |
| that they have the same child.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.AnyOperand.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.AnyOperand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Operand to a <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a relational expression of a |
| given type.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.FilterOnProjectRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.FilterOnProjectRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Rule that converts a <a href="../rel/logical/LogicalFilter.html" title="class in org.apache.calcite.rel.logical"><code>LogicalFilter</code></a> |
| on top of a <a href="../rel/logical/LogicalProject.html" title="class in org.apache.calcite.rel.logical"><code>LogicalProject</code></a> into a |
| trivial filter (on a boolean column).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.FilterToFilterUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.FilterToFilterUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a |
| <a href="../rel/mutable/MutableFilter.html" title="class in org.apache.calcite.rel.mutable"><code>MutableFilter</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.FilterToProjectUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.FilterToProjectUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a <a href="../rel/mutable/MutableFilter.html" title="class in org.apache.calcite.rel.mutable"><code>MutableFilter</code></a> |
| to a <a href="../rel/mutable/MutableProject.html" title="class in org.apache.calcite.rel.mutable"><code>MutableProject</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.InternalOperand.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.InternalOperand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Operand to a <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a relational expression of a |
| given type.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.MatchFailed.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.MatchFailed</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Exception thrown to exit a matcher.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.Operand.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Operand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Operand to a <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.ProjectToFilterUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.ProjectToFilterUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches a <a href="../rel/mutable/MutableProject.html" title="class in org.apache.calcite.rel.mutable"><code>MutableProject</code></a> |
| to a <a href="../rel/mutable/MutableFilter.html" title="class in org.apache.calcite.rel.mutable"><code>MutableFilter</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.ProjectToProjectUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.ProjectToProjectUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches |
| <a href="../rel/core/Project.html" title="class in org.apache.calcite.rel.core"><code>Project</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.QueryOperand.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.QueryOperand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Operand that assigns a particular relational expression to a variable.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Represents a replacement action: before → after.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.ScanToProjectUnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.ScanToProjectUnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches |
| <a href="../rel/core/TableScan.html" title="class in org.apache.calcite.rel.core"><code>TableScan</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.SlotCounter.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.SlotCounter</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Visitor that counts how many <a href="SubstitutionVisitor.QueryOperand.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.QueryOperand</code></a> and |
| <a href="SubstitutionVisitor.TargetOperand.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.TargetOperand</code></a> in an operand tree.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.TargetOperand.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.TargetOperand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Operand that checks that a relational expression matches the corresponding |
| relational expression that was passed to a <a href="SubstitutionVisitor.QueryOperand.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.QueryOperand</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.TrivialRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.TrivialRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> that matches if the query is already |
| equal to the target.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.UnifyResult.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyResult</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Result of an application of a <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a> indicating that the |
| rule successfully matched <code>query</code> against <code>target</code> and |
| generated a <code>result</code> that is equivalent to <code>query</code> and |
| contains <code>target</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Rule that attempts to match a query relational expression |
| against a target relational expression.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SubstitutionVisitor.UnifyRuleCall.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRuleCall</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Arguments to an application of a <a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan"><code>SubstitutionVisitor.UnifyRule</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cluster">cluster</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEBUG">DEBUG</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_RULES">DEFAULT_RULES</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) com.google.common.collect.Multimap<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>,​<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equivalents">equivalents</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static org.slf4j.Logger</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LOGGER">LOGGER</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private <a href="../rel/mutable/Holder.html" title="class in org.apache.calcite.rel.mutable">Holder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#query">query</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) java.util.List<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#queryLeaves">queryLeaves</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Nodes in <a href="#query"><code>query</code></a> that have no children.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#relBuilder">relBuilder</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Factory for a builder for relational expressions.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) java.util.Map<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>,​<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replacementMap">replacementMap</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private java.util.Map<<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><java.lang.Class,​java.lang.Class>,​java.util.List<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ruleMap">ruleMap</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rules">rules</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private <a href="../rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#simplify">simplify</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#slots">slots</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Workspace while rule is being matched.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#target">target</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) java.util.List<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#targetLeaves">targetLeaves</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Nodes in <a href="#target"><code>target</code></a> that have no children.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </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.RelNode,org.apache.calcite.rel.RelNode)">SubstitutionVisitor</a></span>​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a SubstitutionVisitor with the default rule set.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,com.google.common.collect.ImmutableList)">SubstitutionVisitor</a></span>​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_, |
| com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> rules)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a SubstitutionVisitor with the default logical builder.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,com.google.common.collect.ImmutableList,org.apache.calcite.tools.RelBuilderFactory)">SubstitutionVisitor</a></span>​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_, |
| com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> rules, |
| <a href="../tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a> relBuilderFactory)</code></th> |
| <td class="colLast"> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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 java.util.List<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#applicableRules(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">applicableRules</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>private <a href="SubstitutionVisitor.UnifyResult.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyResult</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#apply(org.apache.calcite.plan.SubstitutionVisitor.UnifyRule,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">apply</a></span>​(<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a> rule, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>private static <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="#canonizeNode(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode)">canonizeNode</a></span>​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</code></th> |
| <td class="colLast"> |
| <div class="block">Reorders some of the operands in this expression so structural comparison, |
| i.e., based on string representation, can be more precise.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalType(java.lang.String,org.apache.calcite.rel.mutable.MutableRel,java.lang.String,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.Litmus)">equalType</a></span>​(java.lang.String desc0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| java.lang.String desc1, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel1, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether two relational expressions have the same row-type.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>protected static <a href="../rex/RexShuttle.html" title="class in org.apache.calcite.rex">RexShuttle</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRexShuttle(org.apache.calcite.rel.mutable.MutableProject)">getRexShuttle</a></span>​(<a href="../rel/mutable/MutableProject.html" title="class in org.apache.calcite.rel.mutable">MutableProject</a> target)</code></th> |
| <td class="colLast"> |
| <div class="block">Builds a shuttle that stores a list of expressions, and can map incoming |
| expressions to references to them.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../sql/SqlAggFunction.html" title="class in org.apache.calcite.sql">SqlAggFunction</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRollup(org.apache.calcite.sql.SqlAggFunction)">getRollup</a></span>​(<a href="../sql/SqlAggFunction.html" title="class in org.apache.calcite.sql">SqlAggFunction</a> aggregation)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>private java.util.List<java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#go(org.apache.calcite.rel.mutable.MutableRel)">go</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replacement)</code></th> |
| <td class="colLast"> |
| <div class="block">Substitutes the query with replacement whenever possible but meanwhile |
| keeps track of all the substitutions and their original rel before |
| replacement, so that in later processing stage, the replacement can be |
| recovered individually to produce a list of all possible rels with |
| substitution in different places.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#go(org.apache.calcite.rel.RelNode)">go</a></span>​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> replacement_)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a list of all possible rels that result from substituting the |
| matched RelNode with the replacement RelNode within the query.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#go0(org.apache.calcite.rel.RelNode)">go0</a></span>​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> replacement_)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEquivalent(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)">isEquivalent</a></span>​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWeaker(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">isWeaker</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns if one rel is weaker than another.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>private <a href="SubstitutionVisitor.UnifyResult.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyResult</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#matchRecurse(org.apache.calcite.rel.mutable.MutableRel)">matchRecurse</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mayBeSatisfiable(org.apache.calcite.rex.RexNode)">mayBeSatisfiable</a></span>​(<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> e)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a boolean expression ever returns true.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mightMatch(org.apache.calcite.plan.SubstitutionVisitor.UnifyRule,java.lang.Class,java.lang.Class)">mightMatch</a></span>​(<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a> rule, |
| java.lang.Class queryClass, |
| java.lang.Class targetClass)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#permute(org.apache.calcite.rel.mutable.MutableAggregate,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.mapping.Mapping)">permute</a></span>​(<a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> aggregate, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> input, |
| <a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a> mapping)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#redoReplacement(java.util.List)">redoReplacement</a></span>​(java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>> replacement)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>(package private) void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#register(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">register</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> result, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replace(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">replace</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> find, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replace)</code></th> |
| <td class="colLast"> |
| <div class="block">Within a relational expression <code>query</code>, replaces occurrences of |
| <code>find</code> with <code>replace</code>.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>private static <a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replaceRecurse(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)">replaceRecurse</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> find, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replace)</code></th> |
| <td class="colLast"> |
| <div class="block">Helper for <a href="#replace(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"><code>replace(org.apache.calcite.rel.mutable.MutableRel, org.apache.calcite.rel.mutable.MutableRel, org.apache.calcite.rel.mutable.MutableRel)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reverseSubstitute(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.mutable.Holder,java.util.List,java.util.List,int,int)">reverseSubstitute</a></span>​(<a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../rel/mutable/Holder.html" title="class in org.apache.calcite.rel.mutable">Holder</a> query, |
| java.util.List<java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>>> matches, |
| java.util.List<<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>> sub, |
| int replaceCount, |
| int maxCount)</code></th> |
| <td class="colLast"> </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="#rowTypesAreEquivalent(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.Litmus)">rowTypesAreEquivalent</a></span>​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel1, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</code></th> |
| <td class="colLast"> |
| <div class="block">Equivalence checking for row types, but except for the field names.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static <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="#splitFilter(org.apache.calcite.rex.RexSimplify,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)">splitFilter</a></span>​(<a href="../rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</code></th> |
| <td class="colLast"> |
| <div class="block">Maps a condition onto a target.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>private static <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="#splitOr(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)">splitOr</a></span>​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#undoReplacement(java.util.List)">undoReplacement</a></span>​(java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>> replacement)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unifyAggregates(org.apache.calcite.rel.mutable.MutableAggregate,org.apache.calcite.rel.mutable.MutableAggregate)">unifyAggregates</a></span>​(<a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> query, |
| <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> target)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="DEBUG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEBUG</h4> |
| <pre>private static final boolean DEBUG</pre> |
| </li> |
| </ul> |
| <a id="LOGGER"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOGGER</h4> |
| <pre>private static final org.slf4j.Logger LOGGER</pre> |
| </li> |
| </ul> |
| <a id="DEFAULT_RULES"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_RULES</h4> |
| <pre>protected static final com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> DEFAULT_RULES</pre> |
| </li> |
| </ul> |
| <a id="relBuilder"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>relBuilder</h4> |
| <pre>protected final <a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder</pre> |
| <div class="block">Factory for a builder for relational expressions.</div> |
| </li> |
| </ul> |
| <a id="rules"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rules</h4> |
| <pre>private final com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> rules</pre> |
| </li> |
| </ul> |
| <a id="ruleMap"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ruleMap</h4> |
| <pre>private final java.util.Map<<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><java.lang.Class,​java.lang.Class>,​java.util.List<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>>> ruleMap</pre> |
| </li> |
| </ul> |
| <a id="cluster"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cluster</h4> |
| <pre>private final <a href="RelOptCluster.html" title="class in org.apache.calcite.plan">RelOptCluster</a> cluster</pre> |
| </li> |
| </ul> |
| <a id="simplify"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>simplify</h4> |
| <pre>private final <a href="../rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify</pre> |
| </li> |
| </ul> |
| <a id="query"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>private final <a href="../rel/mutable/Holder.html" title="class in org.apache.calcite.rel.mutable">Holder</a> query</pre> |
| </li> |
| </ul> |
| <a id="target"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>target</h4> |
| <pre>private final <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target</pre> |
| </li> |
| </ul> |
| <a id="targetLeaves"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>targetLeaves</h4> |
| <pre>final java.util.List<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>> targetLeaves</pre> |
| <div class="block">Nodes in <a href="#target"><code>target</code></a> that have no children.</div> |
| </li> |
| </ul> |
| <a id="queryLeaves"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>queryLeaves</h4> |
| <pre>final java.util.List<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>> queryLeaves</pre> |
| <div class="block">Nodes in <a href="#query"><code>query</code></a> that have no children.</div> |
| </li> |
| </ul> |
| <a id="replacementMap"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replacementMap</h4> |
| <pre>final java.util.Map<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>,​<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>> replacementMap</pre> |
| </li> |
| </ul> |
| <a id="equivalents"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equivalents</h4> |
| <pre>final com.google.common.collect.Multimap<<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>,​<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>> equivalents</pre> |
| </li> |
| </ul> |
| <a id="slots"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>slots</h4> |
| <pre>protected final <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a>[] slots</pre> |
| <div class="block">Workspace while rule is being matched. |
| Careful, re-entrant! |
| Assumes no rule needs more than 2 slots.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SubstitutionVisitor</h4> |
| <pre>public SubstitutionVisitor​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_)</pre> |
| <div class="block">Creates a SubstitutionVisitor with the default rule set.</div> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,com.google.common.collect.ImmutableList)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SubstitutionVisitor</h4> |
| <pre>public SubstitutionVisitor​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_, |
| com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> rules)</pre> |
| <div class="block">Creates a SubstitutionVisitor with the default logical builder.</div> |
| </li> |
| </ul> |
| <a id="<init>(org.apache.calcite.rel.RelNode,org.apache.calcite.rel.RelNode,com.google.common.collect.ImmutableList,org.apache.calcite.tools.RelBuilderFactory)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SubstitutionVisitor</h4> |
| <pre>public SubstitutionVisitor​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> target_, |
| <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> query_, |
| com.google.common.collect.ImmutableList<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> rules, |
| <a href="../tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a> relBuilderFactory)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="register(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>register</h4> |
| <pre class="methodSignature">void register​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> result, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query)</pre> |
| </li> |
| </ul> |
| <a id="splitFilter(org.apache.calcite.rex.RexSimplify,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>splitFilter</h4> |
| <pre class="methodSignature">public static <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> splitFilter​(<a href="../rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</pre> |
| <div class="block">Maps a condition onto a target. |
| |
| <p>If condition is stronger than target, returns the residue. |
| If it is equal to target, returns the expression that evaluates to |
| the constant <code>true</code>. If it is weaker than target, returns |
| <code>null</code>.</p> |
| |
| <p>The terms satisfy the relation</p> |
| |
| <blockquote> |
| <pre><code>condition = target AND residue</code></pre> |
| </blockquote> |
| |
| <p>and <code>residue</code> must be as weak as possible.</p> |
| |
| <p>Example #1: condition stronger than target</p> |
| <ul> |
| <li>condition: x = 1 AND y = 2</li> |
| <li>target: x = 1</li> |
| <li>residue: y = 2</li> |
| </ul> |
| |
| <p>Note that residue <code>x &gt; 0 AND y = 2</code> would also satisfy the |
| relation <code>condition = target AND residue</code> but is stronger than |
| necessary, so we prefer <code>y = 2</code>.</p> |
| |
| <p>Example #2: target weaker than condition (valid, but not currently |
| implemented)</p> |
| <ul> |
| <li>condition: x = 1</li> |
| <li>target: x = 1 OR z = 3</li> |
| <li>residue: x = 1</li> |
| </ul> |
| |
| <p>Example #3: condition and target are equivalent</p> |
| <ul> |
| <li>condition: x = 1 AND y = 2</li> |
| <li>target: y = 2 AND x = 1</li> |
| <li>residue: TRUE</li> |
| </ul> |
| |
| <p>Example #4: condition weaker than target</p> |
| <ul> |
| <li>condition: x = 1</li> |
| <li>target: x = 1 AND y = 2</li> |
| <li>residue: null (i.e. no match)</li> |
| </ul> |
| |
| <p>There are many other possible examples. It amounts to solving |
| whether <code>condition AND NOT target</code> can ever evaluate to |
| true, and therefore is a form of the NP-complete |
| <a href="http://en.wikipedia.org/wiki/Satisfiability">Satisfiability</a> |
| problem.</p></div> |
| </li> |
| </ul> |
| <a id="canonizeNode(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>canonizeNode</h4> |
| <pre class="methodSignature">private static <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> canonizeNode​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</pre> |
| <div class="block">Reorders some of the operands in this expression so structural comparison, |
| i.e., based on string representation, can be more precise.</div> |
| </li> |
| </ul> |
| <a id="splitOr(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>splitOr</h4> |
| <pre class="methodSignature">private static <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> splitOr​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</pre> |
| </li> |
| </ul> |
| <a id="isEquivalent(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexNode,org.apache.calcite.rex.RexNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEquivalent</h4> |
| <pre class="methodSignature">private static boolean isEquivalent​(<a href="../rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> target)</pre> |
| </li> |
| </ul> |
| <a id="mayBeSatisfiable(org.apache.calcite.rex.RexNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mayBeSatisfiable</h4> |
| <pre class="methodSignature">public static boolean mayBeSatisfiable​(<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> e)</pre> |
| <div class="block">Returns whether a boolean expression ever returns true. |
| |
| <p>This method may give false positives. For instance, it will say |
| that <code>x = 5 AND x > 10</code> is satisfiable, because at present it |
| cannot prove that it is not.</p></div> |
| </li> |
| </ul> |
| <a id="go0(org.apache.calcite.rel.RelNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>go0</h4> |
| <pre class="methodSignature">public <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> go0​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> replacement_)</pre> |
| </li> |
| </ul> |
| <a id="go(org.apache.calcite.rel.RelNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>go</h4> |
| <pre class="methodSignature">public java.util.List<<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>> go​(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> replacement_)</pre> |
| <div class="block">Returns a list of all possible rels that result from substituting the |
| matched RelNode with the replacement RelNode within the query. |
| |
| <p>For example, the substitution result of A join B, while A and B |
| are both a qualified match for replacement R, is R join B, R join R, |
| A join R.</div> |
| </li> |
| </ul> |
| <a id="go(org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>go</h4> |
| <pre class="methodSignature">private java.util.List<java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>>> go​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replacement)</pre> |
| <div class="block">Substitutes the query with replacement whenever possible but meanwhile |
| keeps track of all the substitutions and their original rel before |
| replacement, so that in later processing stage, the replacement can be |
| recovered individually to produce a list of all possible rels with |
| substitution in different places.</div> |
| </li> |
| </ul> |
| <a id="rowTypesAreEquivalent(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.Litmus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rowTypesAreEquivalent</h4> |
| <pre class="methodSignature">private boolean rowTypesAreEquivalent​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel1, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</pre> |
| <div class="block">Equivalence checking for row types, but except for the field names.</div> |
| </li> |
| </ul> |
| <a id="replace(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replace</h4> |
| <pre class="methodSignature">public static <a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a> replace​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> find, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replace)</pre> |
| <div class="block">Within a relational expression <code>query</code>, replaces occurrences of |
| <code>find</code> with <code>replace</code>. |
| |
| <p>Assumes relational expressions (and their descendants) are not null. |
| Does not handle cycles.</div> |
| </li> |
| </ul> |
| <a id="replaceRecurse(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replaceRecurse</h4> |
| <pre class="methodSignature">private static <a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a> replaceRecurse​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> find, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> replace)</pre> |
| <div class="block">Helper for <a href="#replace(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"><code>replace(org.apache.calcite.rel.mutable.MutableRel, org.apache.calcite.rel.mutable.MutableRel, org.apache.calcite.rel.mutable.MutableRel)</code></a>.</div> |
| </li> |
| </ul> |
| <a id="undoReplacement(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>undoReplacement</h4> |
| <pre class="methodSignature">private static void undoReplacement​(java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>> replacement)</pre> |
| </li> |
| </ul> |
| <a id="redoReplacement(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>redoReplacement</h4> |
| <pre class="methodSignature">private static void redoReplacement​(java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>> replacement)</pre> |
| </li> |
| </ul> |
| <a id="reverseSubstitute(org.apache.calcite.tools.RelBuilder,org.apache.calcite.rel.mutable.Holder,java.util.List,java.util.List,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reverseSubstitute</h4> |
| <pre class="methodSignature">private static void reverseSubstitute​(<a href="../tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../rel/mutable/Holder.html" title="class in org.apache.calcite.rel.mutable">Holder</a> query, |
| java.util.List<java.util.List<<a href="SubstitutionVisitor.Replacement.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.Replacement</a>>> matches, |
| java.util.List<<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>> sub, |
| int replaceCount, |
| int maxCount)</pre> |
| </li> |
| </ul> |
| <a id="matchRecurse(org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matchRecurse</h4> |
| <pre class="methodSignature">private <a href="SubstitutionVisitor.UnifyResult.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyResult</a> matchRecurse​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</pre> |
| </li> |
| </ul> |
| <a id="apply(org.apache.calcite.plan.SubstitutionVisitor.UnifyRule,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>apply</h4> |
| <pre class="methodSignature">private <a href="SubstitutionVisitor.UnifyResult.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyResult</a> apply​(<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a> rule, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</pre> |
| </li> |
| </ul> |
| <a id="applicableRules(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>applicableRules</h4> |
| <pre class="methodSignature">private java.util.List<<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a>> applicableRules​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> query, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> target)</pre> |
| </li> |
| </ul> |
| <a id="mightMatch(org.apache.calcite.plan.SubstitutionVisitor.UnifyRule,java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mightMatch</h4> |
| <pre class="methodSignature">private static boolean mightMatch​(<a href="SubstitutionVisitor.UnifyRule.html" title="class in org.apache.calcite.plan">SubstitutionVisitor.UnifyRule</a> rule, |
| java.lang.Class queryClass, |
| java.lang.Class targetClass)</pre> |
| </li> |
| </ul> |
| <a id="permute(org.apache.calcite.rel.mutable.MutableAggregate,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.mapping.Mapping)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>permute</h4> |
| <pre class="methodSignature">public static <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> permute​(<a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> aggregate, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> input, |
| <a href="../util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a> mapping)</pre> |
| </li> |
| </ul> |
| <a id="unifyAggregates(org.apache.calcite.rel.mutable.MutableAggregate,org.apache.calcite.rel.mutable.MutableAggregate)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unifyAggregates</h4> |
| <pre class="methodSignature">public static <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> unifyAggregates​(<a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> query, |
| <a href="../rel/mutable/MutableAggregate.html" title="class in org.apache.calcite.rel.mutable">MutableAggregate</a> target)</pre> |
| </li> |
| </ul> |
| <a id="getRollup(org.apache.calcite.sql.SqlAggFunction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRollup</h4> |
| <pre class="methodSignature">public static <a href="../sql/SqlAggFunction.html" title="class in org.apache.calcite.sql">SqlAggFunction</a> getRollup​(<a href="../sql/SqlAggFunction.html" title="class in org.apache.calcite.sql">SqlAggFunction</a> aggregation)</pre> |
| </li> |
| </ul> |
| <a id="getRexShuttle(org.apache.calcite.rel.mutable.MutableProject)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRexShuttle</h4> |
| <pre class="methodSignature">protected static <a href="../rex/RexShuttle.html" title="class in org.apache.calcite.rex">RexShuttle</a> getRexShuttle​(<a href="../rel/mutable/MutableProject.html" title="class in org.apache.calcite.rel.mutable">MutableProject</a> target)</pre> |
| <div class="block">Builds a shuttle that stores a list of expressions, and can map incoming |
| expressions to references to them.</div> |
| </li> |
| </ul> |
| <a id="isWeaker(org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.rel.mutable.MutableRel)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWeaker</h4> |
| <pre class="methodSignature">protected boolean isWeaker​(<a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel)</pre> |
| <div class="block">Returns if one rel is weaker than another.</div> |
| </li> |
| </ul> |
| <a id="equalType(java.lang.String,org.apache.calcite.rel.mutable.MutableRel,java.lang.String,org.apache.calcite.rel.mutable.MutableRel,org.apache.calcite.util.Litmus)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>equalType</h4> |
| <pre class="methodSignature">public static boolean equalType​(java.lang.String desc0, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel0, |
| java.lang.String desc1, |
| <a href="../rel/mutable/MutableRel.html" title="class in org.apache.calcite.rel.mutable">MutableRel</a> rel1, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</pre> |
| <div class="block">Returns whether two relational expressions have the same row-type.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/SubstitutionVisitor.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 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |