| <!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>RexProgramBuilder (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="RexProgramBuilder (Apache Calcite calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":41,"i10":41,"i11":9,"i12":9,"i13":9,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":9,"i20":9,"i21":41,"i22":10,"i23":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/rex/RexProgram.html" title="class in org.apache.calcite.rex"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/calcite/rex/RexRangeRef.html" title="class in org.apache.calcite.rex"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/calcite/rex/RexProgramBuilder.html" target="_top">Frames</a></li> |
| <li><a href="RexProgramBuilder.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>Nested | </li> |
| <li>Field | </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>Field | </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.rex</div> |
| <h2 title="Class RexProgramBuilder" class="title">Class RexProgramBuilder</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>org.apache.calcite.rex.RexProgramBuilder</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">RexProgramBuilder</span> |
| extends <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></pre> |
| <div class="block">Workspace for constructing a <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex"><code>RexProgram</code></a>. |
| |
| <p>RexProgramBuilder is necessary because a <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex"><code>RexProgram</code></a> is immutable. |
| (The <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a> class has the same problem: it is immutable, so they |
| introduced <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a>.)</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== 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="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#RexProgramBuilder-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexBuilder-">RexProgramBuilder</a></span>(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</code> |
| <div class="block">Creates a program-builder that will not simplify.</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addCondition-org.apache.calcite.rex.RexNode-">addCondition</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code> |
| <div class="block">Sets the condition of the program.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addExpr-org.apache.calcite.rex.RexNode-">addExpr</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code> |
| <div class="block">Adds an expression to the list of common expressions, and returns a |
| reference to the expression.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addIdentity--">addIdentity</a></span>()</code> |
| <div class="block">Adds a project item for every input field.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addProject-int-int-java.lang.String-">addProject</a></span>(int at, |
| int ordinal, |
| <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> name)</code> |
| <div class="block">Adds a projection based upon the <code>index</code>th expression at a |
| given position.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addProject-int-org.apache.calcite.rex.RexNode-java.lang.String-">addProject</a></span>(int at, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| <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> name)</code> |
| <div class="block">Adds a project expression to the program at a given position.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addProject-int-java.lang.String-">addProject</a></span>(int ordinal, |
| <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> name)</code> |
| <div class="block">Adds a projection based upon the <code>index</code>th expression.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#addProject-org.apache.calcite.rex.RexNode-java.lang.String-">addProject</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| <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> name)</code> |
| <div class="block">Adds a project expression to the program.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#clearCondition--">clearCondition</a></span>()</code> |
| <div class="block">Clears the condition.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#clearProjects--">clearProjects</a></span>()</code> |
| <div class="block">Removes all project items.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-">create</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/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-boolean-">create</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/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize, |
| boolean simplify_)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-org.apache.calcite.rex.RexSimplify-">create</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/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize, |
| <a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify)</code> |
| <div class="block">Creates a program builder with the same contents as a program.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexLocalRef-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexShuttle-boolean-">create</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/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> projectRefList, |
| <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> conditionRef, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| <a href="../../../../org/apache/calcite/rex/RexShuttle.html" title="class in org.apache.calcite.rex">RexShuttle</a> shuttle, |
| boolean updateRefs)</code> |
| <div class="block">Creates a program builder with the same contents as a program, applying a |
| shuttle first.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#forProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-boolean-">forProgram</a></span>(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean normalize)</code> |
| <div class="block">Creates a program builder and initializes it from an existing program.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#getInputRowType--">getInputRowType</a></span>()</code> |
| <div class="block">Returns the rowtype of the input to the program</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#getProgram--">getProgram</a></span>()</code> |
| <div class="block">Converts the state of the program builder to an immutable program, |
| normalizing in the process.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#getProgram-boolean-">getProgram</a></span>(boolean normalize)</code> |
| <div class="block">Converts the state of the program builder to an immutable program.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><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/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#getProjectList--">getProjectList</a></span>()</code> |
| <div class="block">Returns the list of project expressions.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#makeInputRef-int-">makeInputRef</a></span>(int index)</code> |
| <div class="block">Creates a reference to a given input field.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#mergePrograms-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-">mergePrograms</a></span>(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> topProgram, |
| <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> bottomProgram, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</code> |
| <div class="block">Merges two programs together, and normalizes the result.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#mergePrograms-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-boolean-">mergePrograms</a></span>(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> topProgram, |
| <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> bottomProgram, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean normalize)</code> |
| <div class="block">Merges two programs together.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#normalize-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexProgram-">normalize</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/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#registerInput-org.apache.calcite.rex.RexNode-">registerInput</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code> |
| <div class="block">Registers an expression in the list of common sub-expressions, and |
| returns a reference to that expression.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#registerOutput-org.apache.calcite.rex.RexNode-">registerOutput</a></span>(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code> |
| <div class="block">Converts an expression expressed in terms of the <em>outputs</em> of this |
| program into an expression expressed in terms of the <em>inputs</em>, |
| registers it in the list of common sub-expressions, and returns a |
| reference to that expression.</div> |
| </td> |
| </tr> |
| </table> |
| <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#equals-java.lang.Object-" title="class or interface in java.lang">equals</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#hashCode--" title="class or interface in java.lang">hashCode</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#toString--" title="class or interface in java.lang">toString</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"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="RexProgramBuilder-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexBuilder-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>RexProgramBuilder</h4> |
| <pre>public RexProgramBuilder(<a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</pre> |
| <div class="block">Creates a program-builder that will not simplify.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="addProject-org.apache.calcite.rex.RexNode-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addProject</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> addProject(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| <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> name)</pre> |
| <div class="block">Adds a project expression to the program. |
| |
| <p>The expression specified in terms of the input fields. If not, call |
| <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#registerOutput-org.apache.calcite.rex.RexNode-"><code>registerOutput(RexNode)</code></a> first.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expr</code> - Expression to add</dd> |
| <dd><code>name</code> - Name of field in output row type; if null, a unique name will |
| be generated when the program is created</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the ref created</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addProject-int-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addProject</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> addProject(int ordinal, |
| <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> name)</pre> |
| <div class="block">Adds a projection based upon the <code>index</code>th expression.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ordinal</code> - Index of expression to project</dd> |
| <dd><code>name</code> - Name of field in output row type; if null, a unique name |
| will be generated when the program is created</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the ref created</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addProject-int-org.apache.calcite.rex.RexNode-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addProject</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> addProject(int at, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr, |
| <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> name)</pre> |
| <div class="block">Adds a project expression to the program at a given position. |
| |
| <p>The expression specified in terms of the input fields. If not, call |
| <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#registerOutput-org.apache.calcite.rex.RexNode-"><code>registerOutput(RexNode)</code></a> first.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>at</code> - Position in project list to add expression</dd> |
| <dd><code>expr</code> - Expression to add</dd> |
| <dd><code>name</code> - Name of field in output row type; if null, a unique name will |
| be generated when the program is created</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the ref created</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addProject-int-int-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addProject</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> addProject(int at, |
| int ordinal, |
| <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> name)</pre> |
| <div class="block">Adds a projection based upon the <code>index</code>th expression at a |
| given position.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>at</code> - Position in project list to add expression</dd> |
| <dd><code>ordinal</code> - Index of expression to project</dd> |
| <dd><code>name</code> - Name of field in output row type; if null, a unique name |
| will be generated when the program is created</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the ref created</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addCondition-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addCondition</h4> |
| <pre>public void addCondition(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</pre> |
| <div class="block">Sets the condition of the program. |
| |
| <p>The expression must be specified in terms of the input fields. If |
| not, call <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#registerOutput-org.apache.calcite.rex.RexNode-"><code>registerOutput(RexNode)</code></a> first.</p></div> |
| </li> |
| </ul> |
| <a name="registerInput-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerInput</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> registerInput(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</pre> |
| <div class="block">Registers an expression in the list of common sub-expressions, and |
| returns a reference to that expression. |
| |
| <p>The expression must be expressed in terms of the <em>inputs</em> of |
| this program.</p></div> |
| </li> |
| </ul> |
| <a name="registerOutput-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>registerOutput</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> registerOutput(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</pre> |
| <div class="block">Converts an expression expressed in terms of the <em>outputs</em> of this |
| program into an expression expressed in terms of the <em>inputs</em>, |
| registers it in the list of common sub-expressions, and returns a |
| reference to that expression.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expr</code> - Expression to register</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addExpr-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addExpr</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> addExpr(<a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</pre> |
| <div class="block">Adds an expression to the list of common expressions, and returns a |
| reference to the expression. <b>DOES NOT CHECK WHETHER THE EXPRESSION |
| ALREADY EXISTS</b>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expr</code> - Expression</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Reference to expression</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getProgram--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProgram</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> getProgram()</pre> |
| <div class="block">Converts the state of the program builder to an immutable program, |
| normalizing in the process. |
| |
| <p>It is OK to call this method, modify the program specification (by |
| adding projections, and so forth), and call this method again.</div> |
| </li> |
| </ul> |
| <a name="getProgram-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProgram</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> getProgram(boolean normalize)</pre> |
| <div class="block">Converts the state of the program builder to an immutable program. |
| |
| <p>It is OK to call this method, modify the program specification (by |
| adding projections, and so forth), and call this method again.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>normalize</code> - Whether to normalize</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="forProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>forProgram</h4> |
| <pre>public static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a> forProgram(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean normalize)</pre> |
| <div class="block">Creates a program builder and initializes it from an existing program. |
| |
| <p>Calling <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#getProgram--"><code>getProgram()</code></a> immediately after creation will return a |
| program equivalent (in terms of external behavior) to the existing |
| program. |
| |
| <p>The existing program will not be changed. (It cannot: programs are |
| immutable.)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>program</code> - Existing program</dd> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dd><code>normalize</code> - Whether to normalize</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A program builder initialized with an equivalent program</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-org.apache.calcite.rex.RexSimplify-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a> create(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize, |
| <a href="../../../../org/apache/calcite/rex/RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify)</pre> |
| <div class="block">Creates a program builder with the same contents as a program. |
| |
| <p>If <code>normalize</code>, converts the program to canonical form. In |
| canonical form, in addition to the usual constraints: |
| |
| <ul> |
| <li>The first N internal expressions are <a href="../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex"><code>RexInputRef</code></a>s to the N |
| input fields; |
| <li>Subsequent internal expressions reference only preceding expressions; |
| <li>Arguments to <a href="../../../../org/apache/calcite/rex/RexCall.html" title="class in org.apache.calcite.rex"><code>RexCall</code></a>s must be <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex"><code>RexLocalRef</code></a>s (that is, |
| expressions must have maximum depth 1) |
| </ul> |
| |
| <p>there are additional constraints: |
| |
| <ul> |
| <li>Expressions appear in the left-deep order they are needed by |
| the projections and (if present) the condition. Thus, expression N+1 |
| is the leftmost argument (literal or or call) in the expansion of |
| projection #0. |
| <li>There are no duplicate expressions |
| <li>There are no unused expressions |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dd><code>inputRowType</code> - Input row type</dd> |
| <dd><code>exprList</code> - Common expressions</dd> |
| <dd><code>projectList</code> - Projections</dd> |
| <dd><code>condition</code> - Condition, or null</dd> |
| <dd><code>outputRowType</code> - Output row type</dd> |
| <dd><code>normalize</code> - Whether to normalize</dd> |
| <dd><code>simplify</code> - Whether to simplify expressions</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A program builder</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a> create(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize, |
| boolean simplify_)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </li> |
| </ul> |
| <a name="create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.type.RelDataType-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a> create(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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><? extends <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectList, |
| <a href="../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| boolean normalize)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </li> |
| </ul> |
| <a name="create-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rel.type.RelDataType-java.util.List-java.util.List-org.apache.calcite.rex.RexLocalRef-org.apache.calcite.rel.type.RelDataType-org.apache.calcite.rex.RexShuttle-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public static <a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html" title="class in org.apache.calcite.rex">RexProgramBuilder</a> create(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <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>> exprList, |
| <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/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> projectRefList, |
| <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> conditionRef, |
| <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| <a href="../../../../org/apache/calcite/rex/RexShuttle.html" title="class in org.apache.calcite.rex">RexShuttle</a> shuttle, |
| boolean updateRefs)</pre> |
| <div class="block">Creates a program builder with the same contents as a program, applying a |
| shuttle first. |
| |
| <p>TODO: Refactor the above create method in terms of this one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dd><code>inputRowType</code> - Input row type</dd> |
| <dd><code>exprList</code> - Common expressions</dd> |
| <dd><code>projectRefList</code> - Projections</dd> |
| <dd><code>conditionRef</code> - Condition, or null</dd> |
| <dd><code>outputRowType</code> - Output row type</dd> |
| <dd><code>shuttle</code> - Shuttle to apply to each expression before adding it |
| to the program builder</dd> |
| <dd><code>updateRefs</code> - Whether to update references that changes as a result |
| of rewrites made by the shuttle</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A program builder</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="normalize-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexProgram-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>normalize</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> normalize(<a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| </li> |
| </ul> |
| <a name="mergePrograms-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mergePrograms</h4> |
| <pre>public static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> mergePrograms(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> topProgram, |
| <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> bottomProgram, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</pre> |
| <div class="block">Merges two programs together, and normalizes the result.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topProgram</code> - Top program. Its expressions are in terms of the |
| outputs of the bottom program.</dd> |
| <dd><code>bottomProgram</code> - Bottom program. Its expressions are in terms of the |
| result fields of the relational expression's input</dd> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Merged program</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/calcite/rex/RexProgramBuilder.html#mergePrograms-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-boolean-"><code>mergePrograms(RexProgram, RexProgram, RexBuilder, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mergePrograms-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexProgram-org.apache.calcite.rex.RexBuilder-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mergePrograms</h4> |
| <pre>public static <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> mergePrograms(<a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> topProgram, |
| <a href="../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> bottomProgram, |
| <a href="../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean normalize)</pre> |
| <div class="block">Merges two programs together. |
| |
| <p>All expressions become common sub-expressions. For example, the query |
| |
| <blockquote><pre>SELECT x + 1 AS p, x + y AS q FROM ( |
| SELECT a + b AS x, c AS y |
| FROM t |
| WHERE c = 6)}</pre></blockquote> |
| |
| <p>would be represented as the programs |
| |
| <blockquote><pre> |
| Calc: |
| Projects={$2, $3}, |
| Condition=null, |
| Exprs={$0, $1, $0 + 1, $0 + $1}) |
| Calc( |
| Projects={$3, $2}, |
| Condition={$4} |
| Exprs={$0, $1, $2, $0 + $1, $2 = 6} |
| </pre></blockquote> |
| |
| <p>The merged program is |
| |
| <blockquote><pre> |
| Calc( |
| Projects={$4, $5} |
| Condition=$6 |
| Exprs={0: $0 // a |
| 1: $1 // b |
| 2: $2 // c |
| 3: ($0 + $1) // x = a + b |
| 4: ($3 + 1) // p = x + 1 |
| 5: ($3 + $2) // q = x + y |
| 6: ($2 = 6) // c = 6 |
| </pre></blockquote> |
| |
| <p>Another example:</p> |
| |
| <blockquote> |
| <pre>SELECT * |
| FROM ( |
| SELECT a + b AS x, c AS y |
| FROM t |
| WHERE c = 6) |
| WHERE x = 5</pre> |
| </blockquote> |
| |
| <p>becomes |
| |
| <blockquote> |
| <pre>SELECT a + b AS x, c AS y |
| FROM t |
| WHERE c = 6 AND (a + b) = 5</pre> |
| </blockquote></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topProgram</code> - Top program. Its expressions are in terms of the |
| outputs of the bottom program.</dd> |
| <dd><code>bottomProgram</code> - Bottom program. Its expressions are in terms of the |
| result fields of the relational expression's input</dd> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dd><code>normalize</code> - Whether to convert program to canonical form</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Merged program</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clearProjects--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clearProjects</h4> |
| <pre>public void clearProjects()</pre> |
| <div class="block">Removes all project items. |
| |
| <p>After calling this method, you may need to re-normalize.</p></div> |
| </li> |
| </ul> |
| <a name="clearCondition--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clearCondition</h4> |
| <pre>public void clearCondition()</pre> |
| <div class="block">Clears the condition. |
| |
| <p>After calling this method, you may need to re-normalize.</p></div> |
| </li> |
| </ul> |
| <a name="addIdentity--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addIdentity</h4> |
| <pre>public void addIdentity()</pre> |
| <div class="block">Adds a project item for every input field. |
| |
| <p>You cannot call this method if there are other project items.</div> |
| </li> |
| </ul> |
| <a name="makeInputRef-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>makeInputRef</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rex/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> makeInputRef(int index)</pre> |
| <div class="block">Creates a reference to a given input field.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>index</code> - Ordinal of input field, must be less than the number of |
| fields in the input type</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Reference to input field</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInputRowType--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInputRowType</h4> |
| <pre>public <a href="../../../../org/apache/calcite/rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> getInputRowType()</pre> |
| <div class="block">Returns the rowtype of the input to the program</div> |
| </li> |
| </ul> |
| <a name="getProjectList--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getProjectList</h4> |
| <pre>public <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/RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> getProjectList()</pre> |
| <div class="block">Returns the list of project expressions.</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/rex/RexProgram.html" title="class in org.apache.calcite.rex"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/calcite/rex/RexRangeRef.html" title="class in org.apache.calcite.rex"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/calcite/rex/RexProgramBuilder.html" target="_top">Frames</a></li> |
| <li><a href="RexProgramBuilder.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>Nested | </li> |
| <li>Field | </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>Field | </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> |