| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>MaterializedViewRule (Apache Calcite calcite API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MaterializedViewRule (Apache Calcite calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":6,"i2":10,"i3":6,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":6,"i11":10,"i12":10,"i13":10,"i14":6,"i15":10,"i16":10,"i17":10,"i18":6,"i19":6,"i20":10,"i21":10,"i22":10,"i23":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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 class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewProjectJoinRule.html" title="class in org.apache.calcite.rel.rules.materialize"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.Edge.html" title="class in org.apache.calcite.rel.rules.materialize"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html" target="_top">Frames</a></li> |
| <li><a href="MaterializedViewRule.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></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> |
| </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 name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.calcite.rel.rules.materialize</div> |
| <h2 title="Class MaterializedViewRule" class="title">Class MaterializedViewRule</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../../org/apache/calcite/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.materialize.MaterializedViewRule</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewAggregateRule</a>, <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewJoinRule.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewJoinRule</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">MaterializedViewRule</span> |
| extends <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></pre> |
| <div class="block">Planner rule that converts a <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core"><code>Project</code></a> |
| followed by <a href="../../../../../../org/apache/calcite/rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a> or an |
| <a href="../../../../../../org/apache/calcite/rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core"><code>Aggregate</code></a> to a scan (and possibly |
| other operations) over a materialized view.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.Edge.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.Edge</a></span></code> |
| <div class="block">Edge for graph</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a></span></code> |
| <div class="block">Class representing an equivalence class, i.e., a set of equivalent columns</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.MatchModality.html" title="enum in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.MatchModality</a></span></code> |
| <div class="block">Complete, view partial, or query partial.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a></span></code> |
| <div class="block">Expression lineage details.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.ViewPartialRewriting.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.ViewPartialRewriting</a></span></code> |
| <div class="block">View partitioning result</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#fastBailOut">fastBailOut</a></span></code> |
| <div class="block">Whether we should create the rewriting in the minimal subtree of plan |
| operators.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#generateUnionRewriting">generateUnionRewriting</a></span></code> |
| <div class="block">Whether to generate rewritings containing union if the query results |
| are contained within the view results.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/plan/hep/HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#unionRewritingPullProgram">unionRewritingPullProgram</a></span></code> |
| <div class="block">If we generate union rewriting, we might want to pull up projections |
| from the query itself to maximize rewriting opportunities.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.calcite.plan.RelOptRule"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.calcite.plan.<a href="../../../../../../org/apache/calcite/plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></h3> |
| <code><a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#description">description</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#operands">operands</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#relBuilderFactory">relBuilderFactory</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#MaterializedViewRule-org.apache.calcite.plan.RelOptRuleOperand-org.apache.calcite.tools.RelBuilderFactory-java.lang.String-boolean-org.apache.calcite.plan.hep.HepProgram-boolean-">MaterializedViewRule</a></span>(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleOperand.html" title="class in org.apache.calcite.plan">RelOptRuleOperand</a> operand, |
| <a href="../../../../../../org/apache/calcite/tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a> relBuilderFactory, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> description, |
| boolean generateUnionRewriting, |
| <a href="../../../../../../org/apache/calcite/plan/hep/HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a> unionRewritingPullProgram, |
| boolean fastBailOut)</code> |
| <div class="block">Creates a AbstractMaterializedViewRule.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#compensatePartial-java.util.Set-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.Set-com.google.common.collect.Multimap-">compensatePartial</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> sourceTableRefs, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> targetTableRefs, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>> compensationEquiColumns)</code> |
| <div class="block">It checks whether the target can be rewritten using the source even though the |
| source uses additional tables.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.ViewPartialRewriting.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.ViewPartialRewriting</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#compensateViewPartial-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-java.util.Set-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-java.util.Set-">compensateViewPartial</a></span>(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> queryTableRefs, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> viewTableRefs)</code> |
| <div class="block">It checks whether the query can be rewritten using the view even though the |
| query uses additional tables.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#computeCompensationPredicates-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.util.Pair-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.util.Pair-com.google.common.collect.BiMap-">computeCompensationPredicates</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> sourcePreds, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> targetEC, |
| <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> targetPreds, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> sourceToTargetTableMapping)</code> |
| <div class="block">We check whether the predicates in the source are contained in the predicates |
| in the target.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#createUnion-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-">createUnion</a></span>(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> unionInputQuery, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> unionInputView)</code> |
| <div class="block">If the view will be used in a union rewriting, this method is responsible for |
| generating the union and any other operator needed on top of it, e.g., a Project |
| operator.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>protected com.google.common.collect.Multimap<<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#extractPossibleMapping-java.util.List-java.util.List-">extractPossibleMapping</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>>> sourceEquivalenceClasses, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>>> targetEquivalenceClasses)</code> |
| <div class="block">Given the source and target equivalence classes, it extracts the possible mappings |
| from each source equivalence class to each target equivalence class.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#extractReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-">extractReferences</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node)</code> |
| <div class="block">If the node is an Aggregate, it returns a list of references to the grouping columns.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#generateEquivalenceClasses-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-">generateEquivalenceClasses</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> targetEC)</code> |
| <div class="block">Given the equi-column predicates of the source and the target and the |
| computed equivalence classes, it extracts possible mappings between |
| the equivalence classes.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#generateSwapColumnTableReferencesLineage-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.List-">generateSwapColumnTableReferencesLineage</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs)</code> |
| <div class="block">It swaps the column references and then the table references of the input |
| expressions using the equivalence classes and the table mapping.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#generateSwapTableColumnReferencesLineage-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.List-">generateSwapTableColumnReferencesLineage</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs)</code> |
| <div class="block">It swaps the table references and then the column references of the input |
| expressions using the table mapping and the equivalence classes.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#generateTableMappings-com.google.common.collect.Multimap-">generateTableMappings</a></span>(com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> multiMapTables)</code> |
| <div class="block">It will flatten a multimap containing table references to table references, |
| producing all possible combinations of mappings.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#isValidPlan-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.metadata.RelMetadataQuery-">isValidPlan</a></span>(<a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#isValidRelNodePlan-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.metadata.RelMetadataQuery-">isValidRelNodePlan</a></span>(<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</code> |
| <div class="block">Currently we only support TableScan - Project - Filter - Inner Join</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#matches-org.apache.calcite.plan.RelOptRuleCall-">matches</a></span>(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a> call)</code> |
| <div class="block">Returns whether this rule could possibly match the given operands.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#perform-org.apache.calcite.plan.RelOptRuleCall-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-">perform</a></span>(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a> call, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node)</code> |
| <div class="block">Rewriting logic is based on "Optimizing Queries Using Materialized Views: |
| A Practical, Scalable Solution" by Goldstein and Larson.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#pushFilterToOriginalViewPlan-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexNode-">pushFilterToOriginalViewPlan</a></span>(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> builder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> cond)</code> |
| <div class="block">Once we create a compensation predicate, this method is responsible for pushing |
| the resulting filter through the view nodes.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#replaceWithOriginalReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.NodeLineage-org.apache.calcite.rex.RexNode-">replaceWithOriginalReferences</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a> nodeLineage, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> exprToRewrite)</code> |
| <div class="block">Given the input expression, it will replace (sub)expressions when possible |
| using the content of the mapping.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#rewriteExpression-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-boolean-org.apache.calcite.rex.RexNode-">rewriteExpression</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> targetNode, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| boolean swapTableColumn, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> exprToRewrite)</code> |
| <div class="block">First, the method takes the node expressions <code>nodeExprs</code> and swaps the table |
| and column references using the table mapping and the equivalence classes.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#rewriteExpressions-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-boolean-java.util.List-">rewriteExpressions</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> targetNode, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| boolean swapTableColumn, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> exprsToRewrite)</code> |
| <div class="block">First, the method takes the node expressions <code>nodeExprs</code> and swaps the table |
| and column references using the table mapping and the equivalence classes.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#rewriteQuery-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-">rewriteQuery</a></span>(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> compensationColumnsEquiPred, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> otherCompensationPred, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> viewToQueryTableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> viewEC, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC)</code> |
| <div class="block">If the view will be used in a union rewriting, this method is responsible for |
| rewriting the query branch of the union using the given compensation predicate.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#rewriteView-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.MatchModality-boolean-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-">rewriteView</a></span>(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.MatchModality.html" title="enum in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.MatchModality</a> matchModality, |
| boolean unionRewriting, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> queryToViewTableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC)</code> |
| <div class="block">Rewrites the query using the given view query.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.util.mapping.Mapping-">shuttleReferences</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> node, |
| <a href="../../../../../../org/apache/calcite/util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a> mapping)</code> |
| <div class="block">Replaces all the input references by the position in the |
| input column set.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-com.google.common.collect.Multimap-">shuttleReferences</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> exprsLineage)</code> |
| <div class="block">Replaces all the possible sub-expressions by input references |
| to the input node.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-com.google.common.collect.Multimap-org.apache.calcite.rel.RelNode-com.google.common.collect.Multimap-">shuttleReferences</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> exprsLineage, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.Multimap<<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> rewritingMapping)</code> |
| <div class="block">Replaces all the possible sub-expressions by input references |
| to the input node.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html#splitPredicates-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-">splitPredicates</a></span>(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred)</code> |
| <div class="block">Classifies each of the predicates in the list into one of these two |
| categories: |
| |
| |
| 1-l) column equality predicates, or |
| 2-r) residual predicates, all the rest |
| </div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.calcite.plan.RelOptRule"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.calcite.plan.<a href="../../../../../../org/apache/calcite/plan/RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a></h3> |
| <code><a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#any--">any</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#convert-org.apache.calcite.rel.RelNode-org.apache.calcite.plan.RelTrait-">convert</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#convert-org.apache.calcite.rel.RelNode-org.apache.calcite.plan.RelTraitSet-">convert</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#convertList-java.util.List-org.apache.calcite.plan.RelTrait-">convertList</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#convertOperand-java.lang.Class-java.util.function.Predicate-org.apache.calcite.plan.RelTrait-">convertOperand</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#convertOperand-java.lang.Class-com.google.common.base.Predicate-org.apache.calcite.plan.RelTrait-">convertOperand</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#equals-java.lang.Object-">equals</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#equals-org.apache.calcite.plan.RelOptRule-">equals</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#getOperand--">getOperand</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#getOperands--">getOperands</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#getOutConvention--">getOutConvention</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#getOutTrait--">getOutTrait</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#hashCode--">hashCode</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#none--">none</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#onMatch-org.apache.calcite.plan.RelOptRuleCall-">onMatch</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#operand-java.lang.Class-org.apache.calcite.plan.RelOptRuleOperandChildren-">operand</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#operand-java.lang.Class-org.apache.calcite.plan.RelOptRuleOperand-org.apache.calcite.plan.RelOptRuleOperand...-">operand</a>, <a href="../../../../../../org/apache/calcite/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="../../../../../../org/apache/calcite/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="../../../../../../org/apache/calcite/plan/RelOptRule.html#operand-java.lang.Class-org.apache.calcite.plan.RelTrait-org.apache.calcite.plan.RelOptRuleOperandChildren-">operand</a>, <a href="../../../../../../org/apache/calcite/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="../../../../../../org/apache/calcite/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="../../../../../../org/apache/calcite/plan/RelOptRule.html#some-org.apache.calcite.plan.RelOptRuleOperand-org.apache.calcite.plan.RelOptRuleOperand...-">some</a>, <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#toString--">toString</a>, <a href="../../../../../../org/apache/calcite/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 name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="generateUnionRewriting"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateUnionRewriting</h4> |
| <pre>protected final boolean generateUnionRewriting</pre> |
| <div class="block">Whether to generate rewritings containing union if the query results |
| are contained within the view results.</div> |
| </li> |
| </ul> |
| <a name="unionRewritingPullProgram"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unionRewritingPullProgram</h4> |
| <pre>protected final <a href="../../../../../../org/apache/calcite/plan/hep/HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a> unionRewritingPullProgram</pre> |
| <div class="block">If we generate union rewriting, we might want to pull up projections |
| from the query itself to maximize rewriting opportunities.</div> |
| </li> |
| </ul> |
| <a name="fastBailOut"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>fastBailOut</h4> |
| <pre>protected final boolean fastBailOut</pre> |
| <div class="block">Whether we should create the rewriting in the minimal subtree of plan |
| operators.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="MaterializedViewRule-org.apache.calcite.plan.RelOptRuleOperand-org.apache.calcite.tools.RelBuilderFactory-java.lang.String-boolean-org.apache.calcite.plan.hep.HepProgram-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MaterializedViewRule</h4> |
| <pre>protected MaterializedViewRule(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleOperand.html" title="class in org.apache.calcite.plan">RelOptRuleOperand</a> operand, |
| <a href="../../../../../../org/apache/calcite/tools/RelBuilderFactory.html" title="interface in org.apache.calcite.tools">RelBuilderFactory</a> relBuilderFactory, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> description, |
| boolean generateUnionRewriting, |
| <a href="../../../../../../org/apache/calcite/plan/hep/HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a> unionRewritingPullProgram, |
| boolean fastBailOut)</pre> |
| <div class="block">Creates a AbstractMaterializedViewRule.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="matches-org.apache.calcite.plan.RelOptRuleCall-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matches</h4> |
| <pre>public boolean matches(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a> call)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#matches-org.apache.calcite.plan.RelOptRuleCall-">RelOptRule</a></code></span></div> |
| <div class="block">Returns whether this rule could possibly match the given operands. |
| |
| <p>This method is an opportunity to apply side-conditions to a rule. The |
| <a href="../../../../../../org/apache/calcite/plan/RelOptPlanner.html" title="interface in org.apache.calcite.plan"><code>RelOptPlanner</code></a> calls this method after matching all operands of |
| the rule, and before calling <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#onMatch-org.apache.calcite.plan.RelOptRuleCall-"><code>RelOptRule.onMatch(RelOptRuleCall)</code></a>. |
| |
| <p>In implementations of <a href="../../../../../../org/apache/calcite/plan/RelOptPlanner.html" title="interface in org.apache.calcite.plan"><code>RelOptPlanner</code></a> which may queue up a |
| matched <a href="../../../../../../org/apache/calcite/plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan"><code>RelOptRuleCall</code></a> for a long time before calling |
| <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#onMatch-org.apache.calcite.plan.RelOptRuleCall-"><code>RelOptRule.onMatch(RelOptRuleCall)</code></a>, this method is beneficial because it |
| allows the planner to discard rules earlier in the process. |
| |
| <p>The default implementation of this method returns <code>true</code>. |
| It is acceptable for any implementation of this method to give a false |
| positives, that is, to say that the rule matches the operands but have |
| <a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#onMatch-org.apache.calcite.plan.RelOptRuleCall-"><code>RelOptRule.onMatch(RelOptRuleCall)</code></a> subsequently not generate any |
| successors. |
| |
| <p>The following script is useful to identify rules which commonly |
| produce no successors. You should override this method for these rules: |
| |
| <blockquote> |
| <pre><code>awk ' |
| /Apply rule/ {rule=$4; ruleCount[rule]++;} |
| /generated 0 successors/ {ruleMiss[rule]++;} |
| END { |
| printf "%-30s %s %s\n", "Rule", "Fire", "Miss"; |
| for (i in ruleCount) { |
| printf "%-30s %5d %5d\n", i, ruleCount[i], ruleMiss[i]; |
| } |
| } ' FarragoTrace.log</code></pre> |
| </blockquote></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/calcite/plan/RelOptRule.html#matches-org.apache.calcite.plan.RelOptRuleCall-">matches</a></code> in class <code><a href="../../../../../../org/apache/calcite/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 which has been determined to match all operands of |
| this rule</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this RelOptRule matches a given RelOptRuleCall</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="perform-org.apache.calcite.plan.RelOptRuleCall-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>perform</h4> |
| <pre>protected void perform(<a href="../../../../../../org/apache/calcite/plan/RelOptRuleCall.html" title="class in org.apache.calcite.plan">RelOptRuleCall</a> call, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node)</pre> |
| <div class="block">Rewriting logic is based on "Optimizing Queries Using Materialized Views: |
| A Practical, Scalable Solution" by Goldstein and Larson. |
| |
| <p>On the query side, rules matches a Project-node chain or node, where node |
| is either an Aggregate or a Join. Subplan rooted at the node operator must |
| be composed of one or more of the following operators: TableScan, Project, |
| Filter, and Join. |
| |
| <p>For each join MV, we need to check the following: |
| <ol> |
| <li> The plan rooted at the Join operator in the view produces all rows |
| needed by the plan rooted at the Join operator in the query.</li> |
| <li> All columns required by compensating predicates, i.e., predicates that |
| need to be enforced over the view, are available at the view output.</li> |
| <li> All output expressions can be computed from the output of the view.</li> |
| <li> All output rows occur with the correct duplication factor. We might |
| rely on existing Unique-Key - Foreign-Key relationships to extract that |
| information.</li> |
| </ol> |
| |
| <p>In turn, for each aggregate MV, we need to check the following: |
| <ol> |
| <li> The plan rooted at the Aggregate operator in the view produces all rows |
| needed by the plan rooted at the Aggregate operator in the query.</li> |
| <li> All columns required by compensating predicates, i.e., predicates that |
| need to be enforced over the view, are available at the view output.</li> |
| <li> The grouping columns in the query are a subset of the grouping columns |
| in the view.</li> |
| <li> All columns required to perform further grouping are available in the |
| view output.</li> |
| <li> All columns required to compute output expressions are available in the |
| view output.</li> |
| </ol> |
| |
| <p>The rule contains multiple extensions compared to the original paper. One of |
| them is the possibility of creating rewritings using Union operators, e.g., if |
| the result of a query is partially contained in the materialized view.</div> |
| </li> |
| </ul> |
| <a name="isValidPlan-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.metadata.RelMetadataQuery-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isValidPlan</h4> |
| <pre>protected abstract boolean isValidPlan(<a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</pre> |
| </li> |
| </ul> |
| <a name="compensateViewPartial-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-java.util.Set-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-java.util.Set-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compensateViewPartial</h4> |
| <pre>protected abstract <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.ViewPartialRewriting.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.ViewPartialRewriting</a> compensateViewPartial(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> queryTableRefs, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> viewTableRefs)</pre> |
| <div class="block">It checks whether the query can be rewritten using the view even though the |
| query uses additional tables. |
| |
| <p>Rules implementing the method should follow different approaches depending on the |
| operators they rewrite.</div> |
| </li> |
| </ul> |
| <a name="rewriteQuery-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rewriteQuery</h4> |
| <pre>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rewriteQuery(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> compensationColumnsEquiPred, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> otherCompensationPred, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> viewToQueryTableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> viewEC, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC)</pre> |
| <div class="block">If the view will be used in a union rewriting, this method is responsible for |
| rewriting the query branch of the union using the given compensation predicate. |
| |
| <p>If a rewriting can be produced, we return that rewriting. If it cannot |
| be produced, we will return null.</div> |
| </li> |
| </ul> |
| <a name="createUnion-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createUnion</h4> |
| <pre>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> createUnion(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> unionInputQuery, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> unionInputView)</pre> |
| <div class="block">If the view will be used in a union rewriting, this method is responsible for |
| generating the union and any other operator needed on top of it, e.g., a Project |
| operator.</div> |
| </li> |
| </ul> |
| <a name="rewriteView-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.MatchModality-boolean-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Project-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rewriteView</h4> |
| <pre>protected abstract <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rewriteView(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> relBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.MatchModality.html" title="enum in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.MatchModality</a> matchModality, |
| boolean unionRewriting, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> queryToViewTableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> queryEC)</pre> |
| <div class="block">Rewrites the query using the given view query. |
| |
| <p>The input node is a Scan on the view table and possibly a compensation Filter |
| on top. If a rewriting can be produced, we return that rewriting. If it cannot |
| be produced, we will return null.</div> |
| </li> |
| </ul> |
| <a name="pushFilterToOriginalViewPlan-org.apache.calcite.tools.RelBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pushFilterToOriginalViewPlan</h4> |
| <pre>protected abstract <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>,<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>> pushFilterToOriginalViewPlan(<a href="../../../../../../org/apache/calcite/tools/RelBuilder.html" title="class in org.apache.calcite.tools">RelBuilder</a> builder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> topViewProject, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> viewNode, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> cond)</pre> |
| <div class="block">Once we create a compensation predicate, this method is responsible for pushing |
| the resulting filter through the view nodes. This might be useful for rewritings |
| containing Aggregate operators, as some of the grouping columns might be removed, |
| which results in additional matching possibilities. |
| |
| <p>The method will return a pair of nodes: the new top project on the left and |
| the new node on the right.</div> |
| </li> |
| </ul> |
| <a name="extractReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractReferences</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> extractReferences(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node)</pre> |
| <div class="block">If the node is an Aggregate, it returns a list of references to the grouping columns. |
| Otherwise, it returns a list of references to all columns in the node. |
| The returned list is immutable.</div> |
| </li> |
| </ul> |
| <a name="generateTableMappings-com.google.common.collect.Multimap-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateTableMappings</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>>> generateTableMappings(com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> multiMapTables)</pre> |
| <div class="block">It will flatten a multimap containing table references to table references, |
| producing all possible combinations of mappings. Each of the mappings will |
| be bi-directional.</div> |
| </li> |
| </ul> |
| <a name="isValidRelNodePlan-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.metadata.RelMetadataQuery-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isValidRelNodePlan</h4> |
| <pre>protected boolean isValidRelNodePlan(<a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</pre> |
| <div class="block">Currently we only support TableScan - Project - Filter - Inner Join</div> |
| </li> |
| </ul> |
| <a name="splitPredicates-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>splitPredicates</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> splitPredicates(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred)</pre> |
| <div class="block">Classifies each of the predicates in the list into one of these two |
| categories: |
| |
| <ul> |
| <li> 1-l) column equality predicates, or |
| <li> 2-r) residual predicates, all the rest |
| </ul> |
| |
| <p>For each category, it creates the conjunction of the predicates. The |
| result is an pair of RexNode objects corresponding to each category.</div> |
| </li> |
| </ul> |
| <a name="compensatePartial-java.util.Set-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.Set-com.google.common.collect.Multimap-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compensatePartial</h4> |
| <pre>protected boolean compensatePartial(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> sourceTableRefs, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> targetTableRefs, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>> compensationEquiColumns)</pre> |
| <div class="block">It checks whether the target can be rewritten using the source even though the |
| source uses additional tables. In order to do that, we need to double-check |
| that every join that exists in the source and is not in the target is a |
| cardinality-preserving join, i.e., it only appends columns to the row |
| without changing its multiplicity. Thus, the join needs to be: |
| <ul> |
| <li> Equi-join </li> |
| <li> Between all columns in the keys </li> |
| <li> Foreign-key columns do not allow NULL values </li> |
| <li> Foreign-key </li> |
| <li> Unique-key </li> |
| </ul> |
| |
| <p>If it can be rewritten, it returns true. Further, it inserts the missing equi-join |
| predicates in the input <code>compensationEquiColumns</code> multimap if it is provided. |
| If it cannot be rewritten, it returns false.</div> |
| </li> |
| </ul> |
| <a name="computeCompensationPredicates-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexSimplify-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.util.Pair-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.util.Pair-com.google.common.collect.BiMap-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>computeCompensationPredicates</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> computeCompensationPredicates(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> sourcePreds, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> targetEC, |
| <a href="../../../../../../org/apache/calcite/util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> targetPreds, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> sourceToTargetTableMapping)</pre> |
| <div class="block">We check whether the predicates in the source are contained in the predicates |
| in the target. The method treats separately the equi-column predicates, the |
| range predicates, and the rest of predicates. |
| |
| <p>If the containment is confirmed, we produce compensation predicates that |
| need to be added to the target to produce the results in the source. Thus, |
| if source and target expressions are equivalent, those predicates will be the |
| true constant. |
| |
| <p>In turn, if containment cannot be confirmed, the method returns null.</div> |
| </li> |
| </ul> |
| <a name="generateEquivalenceClasses-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateEquivalenceClasses</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> generateEquivalenceClasses(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> sourceEC, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> targetEC)</pre> |
| <div class="block">Given the equi-column predicates of the source and the target and the |
| computed equivalence classes, it extracts possible mappings between |
| the equivalence classes. |
| |
| <p>If there is no mapping, it returns null. If there is a exact match, |
| it will return a compensation predicate that evaluates to true. |
| Finally, if a compensation predicate needs to be enforced on top of |
| the target to make the equivalences classes match, it returns that |
| compensation predicate.</div> |
| </li> |
| </ul> |
| <a name="extractPossibleMapping-java.util.List-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractPossibleMapping</h4> |
| <pre>protected com.google.common.collect.Multimap<<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> extractPossibleMapping(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>>> sourceEquivalenceClasses, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex">RexTableInputRef</a>>> targetEquivalenceClasses)</pre> |
| <div class="block">Given the source and target equivalence classes, it extracts the possible mappings |
| from each source equivalence class to each target equivalence class. |
| |
| <p>If any of the source equivalence classes cannot be mapped to a target equivalence |
| class, it returns null.</div> |
| </li> |
| </ul> |
| <a name="rewriteExpression-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-boolean-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rewriteExpression</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> rewriteExpression(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> targetNode, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| boolean swapTableColumn, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> exprToRewrite)</pre> |
| <div class="block">First, the method takes the node expressions <code>nodeExprs</code> and swaps the table |
| and column references using the table mapping and the equivalence classes. |
| If <code>swapTableColumn</code> is true, it swaps the table reference and then the column reference, |
| otherwise it swaps the column reference and then the table reference. |
| |
| <p>Then, the method will rewrite the input expression <code>exprToRewrite</code>, replacing the |
| <a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex"><code>RexTableInputRef</code></a> by references to the positions in <code>nodeExprs</code>. |
| |
| <p>The method will return the rewritten expression. If any of the expressions in the input |
| expression cannot be mapped, it will return null.</div> |
| </li> |
| </ul> |
| <a name="rewriteExpressions-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-boolean-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rewriteExpressions</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> rewriteExpressions(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> targetNode, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| boolean swapTableColumn, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> exprsToRewrite)</pre> |
| <div class="block">First, the method takes the node expressions <code>nodeExprs</code> and swaps the table |
| and column references using the table mapping and the equivalence classes. |
| If <code>swapTableColumn</code> is true, it swaps the table reference and then the column reference, |
| otherwise it swaps the column reference and then the table reference. |
| |
| <p>Then, the method will rewrite the input expressions <code>exprsToRewrite</code>, replacing the |
| <a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.html" title="class in org.apache.calcite.rex"><code>RexTableInputRef</code></a> by references to the positions in <code>nodeExprs</code>. |
| |
| <p>The method will return the rewritten expressions. If any of the subexpressions in the input |
| expressions cannot be mapped, it will return null.</div> |
| </li> |
| </ul> |
| <a name="generateSwapTableColumnReferencesLineage-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateSwapTableColumnReferencesLineage</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a> generateSwapTableColumnReferencesLineage(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs)</pre> |
| <div class="block">It swaps the table references and then the column references of the input |
| expressions using the table mapping and the equivalence classes.</div> |
| </li> |
| </ul> |
| <a name="generateSwapColumnTableReferencesLineage-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-com.google.common.collect.BiMap-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.EquivalenceClasses-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateSwapColumnTableReferencesLineage</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a> generateSwapColumnTableReferencesLineage(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.BiMap<<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>,<a href="../../../../../../org/apache/calcite/rex/RexTableInputRef.RelTableRef.html" title="class in org.apache.calcite.rex">RexTableInputRef.RelTableRef</a>> tableMapping, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.EquivalenceClasses.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.EquivalenceClasses</a> ec, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> nodeExprs)</pre> |
| <div class="block">It swaps the column references and then the table references of the input |
| expressions using the equivalence classes and the table mapping.</div> |
| </li> |
| </ul> |
| <a name="replaceWithOriginalReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.rules.materialize.MaterializedViewRule.NodeLineage-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replaceWithOriginalReferences</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> replaceWithOriginalReferences(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| <a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.NodeLineage.html" title="class in org.apache.calcite.rel.rules.materialize">MaterializedViewRule.NodeLineage</a> nodeLineage, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> exprToRewrite)</pre> |
| <div class="block">Given the input expression, it will replace (sub)expressions when possible |
| using the content of the mapping. In particular, the mapping contains the |
| digest of the expression and the index that the replacement input ref should |
| point to.</div> |
| </li> |
| </ul> |
| <a name="shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.util.mapping.Mapping-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shuttleReferences</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> shuttleReferences(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> node, |
| <a href="../../../../../../org/apache/calcite/util/mapping/Mapping.html" title="interface in org.apache.calcite.util.mapping">Mapping</a> mapping)</pre> |
| <div class="block">Replaces all the input references by the position in the |
| input column set. If a reference index cannot be found in |
| the input set, then we return null.</div> |
| </li> |
| </ul> |
| <a name="shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-com.google.common.collect.Multimap-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shuttleReferences</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> shuttleReferences(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> exprsLineage)</pre> |
| <div class="block">Replaces all the possible sub-expressions by input references |
| to the input node.</div> |
| </li> |
| </ul> |
| <a name="shuttleReferences-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-com.google.common.collect.Multimap-org.apache.calcite.rel.RelNode-com.google.common.collect.Multimap-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>shuttleReferences</h4> |
| <pre>protected <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> shuttleReferences(<a href="../../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| com.google.common.collect.Multimap<<a href="../../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> exprsLineage, |
| <a href="../../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> node, |
| com.google.common.collect.Multimap<<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> rewritingMapping)</pre> |
| <div class="block">Replaces all the possible sub-expressions by input references |
| to the input node. If available, it uses the rewriting mapping |
| to change the position to reference. Takes the reference type |
| from the input node.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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 class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewProjectJoinRule.html" title="class in org.apache.calcite.rel.rules.materialize"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/calcite/rel/rules/materialize/MaterializedViewRule.Edge.html" title="class in org.apache.calcite.rel.rules.materialize"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/calcite/rel/rules/materialize/MaterializedViewRule.html" target="_top">Frames</a></li> |
| <li><a href="MaterializedViewRule.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.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> |
| </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 name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p> |
| </body> |
| </html> |