| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>HepProgramBuilder (Apache Calcite API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.calcite.plan.hep, class: HepProgramBuilder"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <div class="about-language"><b>Apache Calcite</b></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">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#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.calcite.plan.hep</a></div> |
| <h1 title="Class HepProgramBuilder" class="title">Class HepProgramBuilder</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.calcite.plan.hep.HepProgramBuilder</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">HepProgramBuilder</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">HepProgramBuilder creates instances of <a href="HepProgram.html" title="class in org.apache.calcite.plan.hep"><code>HepProgram</code></a>.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">HepProgramBuilder</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new HepProgramBuilder with an initially empty program.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addCommonRelSubExprInstruction()" class="member-name-link">addCommonRelSubExprInstruction</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match instances of |
| <a href="../CommonRelSubExprRule.html" title="class in org.apache.calcite.plan"><code>CommonRelSubExprRule</code></a>, but only in cases where vertices have more |
| than one parent.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addConverters(boolean)" class="member-name-link">addConverters</a><wbr>(boolean guaranteed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match instances of |
| <a href="../../rel/convert/ConverterRule.html" title="class in org.apache.calcite.rel.convert"><code>ConverterRule</code></a>, |
| but only where a conversion is actually required.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addGroupBegin()" class="member-name-link">addGroupBegin</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to begin a group of rules.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addGroupEnd()" class="member-name-link">addGroupEnd</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to end a group of rules, firing the group |
| collectively.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMatchLimit(int)" class="member-name-link">addMatchLimit</a><wbr>(int limit)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to limit the number of pattern matches for subsequent |
| instructions.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMatchOrder(org.apache.calcite.plan.hep.HepMatchOrder)" class="member-name-link">addMatchOrder</a><wbr>(<a href="HepMatchOrder.html" title="enum in org.apache.calcite.plan.hep">HepMatchOrder</a> order)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to change the order of pattern matching for |
| subsequent instructions.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRuleByDescription(java.lang.String)" class="member-name-link">addRuleByDescription</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> ruleDescription)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match a specific rule identified by its |
| unique description.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><R extends <a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a>><br><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRuleClass(java.lang.Class)" class="member-name-link">addRuleClass</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><R> ruleClass)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match any rules of a given class.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRuleCollection(java.util.Collection)" class="member-name-link">addRuleCollection</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a>> rules)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match any rules in a given collection.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addRuleInstance(org.apache.calcite.plan.RelOptRule)" class="member-name-link">addRuleInstance</a><wbr>(<a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a> rule)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to attempt to match a specific rule object.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addSubprogram(org.apache.calcite.plan.hep.HepProgram)" class="member-name-link">addSubprogram</a><wbr>(<a href="HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a> program)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds an instruction to execute a subprogram.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#build()" class="member-name-link">build</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the constructed program, clearing the state of this program |
| builder as a side-effect.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>HepProgramBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">HepProgramBuilder</span>()</div> |
| <div class="block">Creates a new HepProgramBuilder with an initially empty program. The |
| program under construction has an initial match order of |
| <a href="HepMatchOrder.html#DEPTH_FIRST"><code>HepMatchOrder.DEPTH_FIRST</code></a>, and an initial match limit of |
| <a href="HepProgram.html#MATCH_UNTIL_FIXPOINT"><code>HepProgram.MATCH_UNTIL_FIXPOINT</code></a>.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="addRuleClass(java.lang.Class)"> |
| <h3>addRuleClass</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><R extends <a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a>></span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addRuleClass</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><R> ruleClass)</span></div> |
| <div class="block">Adds an instruction to attempt to match any rules of a given class. The |
| order in which the rules within a class will be attempted is arbitrary, |
| so if more control is needed, use addRuleInstance instead. |
| |
| <p>Note that when this method is used, it is also necessary to add the |
| actual rule objects of interest to the planner via |
| <a href="../RelOptPlanner.html#addRule(org.apache.calcite.plan.RelOptRule)"><code>RelOptPlanner.addRule(org.apache.calcite.plan.RelOptRule)</code></a>. If the planner does not have any |
| rules of the given class, this instruction is a nop. |
| |
| <p>TODO: support classification via rule annotations.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>ruleClass</code> - class of rules to fire, e.g. ConverterRule.class</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addRuleCollection(java.util.Collection)"> |
| <h3>addRuleCollection</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addRuleCollection</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a>> rules)</span></div> |
| <div class="block">Adds an instruction to attempt to match any rules in a given collection. |
| The order in which the rules within a collection will be attempted is |
| arbitrary, so if more control is needed, use addRuleInstance instead. The |
| collection can be "live" in the sense that not all rule instances need to |
| have been added to it at the time this method is called. The collection |
| contents are reevaluated for each execution of the program. |
| |
| <p>Note that when this method is used, it is NOT necessary to add the |
| rules to the planner via <a href="../RelOptPlanner.html#addRule(org.apache.calcite.plan.RelOptRule)"><code>RelOptPlanner.addRule(org.apache.calcite.plan.RelOptRule)</code></a>; the instances |
| supplied here will be used. However, adding the rules to the planner |
| redundantly is good form since other planners may require it.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>rules</code> - collection of rules to fire</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addRuleInstance(org.apache.calcite.plan.RelOptRule)"> |
| <h3>addRuleInstance</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addRuleInstance</span><wbr><span class="parameters">(<a href="../RelOptRule.html" title="class in org.apache.calcite.plan">RelOptRule</a> rule)</span></div> |
| <div class="block">Adds an instruction to attempt to match a specific rule object. |
| |
| <p>Note that when this method is used, it is NOT necessary to add the |
| rule to the planner via <a href="../RelOptPlanner.html#addRule(org.apache.calcite.plan.RelOptRule)"><code>RelOptPlanner.addRule(org.apache.calcite.plan.RelOptRule)</code></a>; the instance |
| supplied here will be used. However, adding the rule to the planner |
| redundantly is good form since other planners may require it.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>rule</code> - rule to fire</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addRuleByDescription(java.lang.String)"> |
| <h3>addRuleByDescription</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addRuleByDescription</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> ruleDescription)</span></div> |
| <div class="block">Adds an instruction to attempt to match a specific rule identified by its |
| unique description. |
| |
| <p>Note that when this method is used, it is necessary to also add the |
| rule object of interest to the planner via <a href="../RelOptPlanner.html#addRule(org.apache.calcite.plan.RelOptRule)"><code>RelOptPlanner.addRule(org.apache.calcite.plan.RelOptRule)</code></a>. |
| This allows for some decoupling between optimizers and plugins: the |
| optimizer only knows about rule descriptions, while the plugins supply |
| the actual instances. If the planner does not have a rule matching the |
| description, this instruction is a nop.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>ruleDescription</code> - description of rule to fire</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addGroupBegin()"> |
| <h3>addGroupBegin</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addGroupBegin</span>()</div> |
| <div class="block">Adds an instruction to begin a group of rules. All subsequent rules added |
| (until the next endRuleGroup) will be collected into the group rather |
| than firing individually. After addGroupBegin has been called, only |
| addRuleXXX methods may be called until the next addGroupEnd.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addGroupEnd()"> |
| <h3>addGroupEnd</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addGroupEnd</span>()</div> |
| <div class="block">Adds an instruction to end a group of rules, firing the group |
| collectively. The order in which the rules within a group will be |
| attempted is arbitrary. Match order and limit applies to the group as a |
| whole.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addConverters(boolean)"> |
| <h3>addConverters</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addConverters</span><wbr><span class="parameters">(boolean guaranteed)</span></div> |
| <div class="block">Adds an instruction to attempt to match instances of |
| <a href="../../rel/convert/ConverterRule.html" title="class in org.apache.calcite.rel.convert"><code>ConverterRule</code></a>, |
| but only where a conversion is actually required.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>guaranteed</code> - if true, use only guaranteed converters; if false, use |
| only non-guaranteed converters</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addCommonRelSubExprInstruction()"> |
| <h3>addCommonRelSubExprInstruction</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addCommonRelSubExprInstruction</span>()</div> |
| <div class="block">Adds an instruction to attempt to match instances of |
| <a href="../CommonRelSubExprRule.html" title="class in org.apache.calcite.plan"><code>CommonRelSubExprRule</code></a>, but only in cases where vertices have more |
| than one parent.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMatchOrder(org.apache.calcite.plan.hep.HepMatchOrder)"> |
| <h3>addMatchOrder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addMatchOrder</span><wbr><span class="parameters">(<a href="HepMatchOrder.html" title="enum in org.apache.calcite.plan.hep">HepMatchOrder</a> order)</span></div> |
| <div class="block">Adds an instruction to change the order of pattern matching for |
| subsequent instructions. The new order will take effect for the rest of |
| the program (not counting subprograms) or until another match order |
| instruction is encountered.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>order</code> - new match direction to set</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMatchLimit(int)"> |
| <h3>addMatchLimit</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addMatchLimit</span><wbr><span class="parameters">(int limit)</span></div> |
| <div class="block">Adds an instruction to limit the number of pattern matches for subsequent |
| instructions. The limit will take effect for the rest of the program (not |
| counting subprograms) or until another limit instruction is encountered.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>limit</code> - limit to set; use <a href="HepProgram.html#MATCH_UNTIL_FIXPOINT"><code>HepProgram.MATCH_UNTIL_FIXPOINT</code></a> to |
| remove limit</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addSubprogram(org.apache.calcite.plan.hep.HepProgram)"> |
| <h3>addSubprogram</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgramBuilder.html" title="class in org.apache.calcite.plan.hep">HepProgramBuilder</a></span> <span class="element-name">addSubprogram</span><wbr><span class="parameters">(<a href="HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a> program)</span></div> |
| <div class="block">Adds an instruction to execute a subprogram. Note that this is different |
| from adding the instructions from the subprogram individually. When added |
| as a subprogram, the sequence will execute repeatedly until a fixpoint is |
| reached, whereas when the instructions are added individually, the |
| sequence will only execute once (with a separate fixpoint for each |
| instruction). |
| |
| <p>The subprogram has its own state for match order and limit |
| (initialized to the defaults every time the subprogram is executed) and |
| any changes it makes to those settings do not affect the parent program.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>program</code> - subProgram to execute</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="build()"> |
| <h3>build</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="HepProgram.html" title="class in org.apache.calcite.plan.hep">HepProgram</a></span> <span class="element-name">build</span>()</div> |
| <div class="block">Returns the constructed program, clearing the state of this program |
| builder as a side-effect.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>immutable program</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |