| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>RexProgram (Apache Calcite calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.calcite.rex, class: RexProgram"> |
| <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.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script> |
| </head> |
| <body class="class-declaration"> |
| <script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":42,"i32":10,"i33":10,"i34":10,"i35":10,"i36":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"; |
| var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flexBox"> |
| <header role="banner" class="flexHeader"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="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"> |
| <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> |
| <div class="navListSearch"><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="skipNav"><a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| </nav> |
| </header> |
| <div class="flexContent"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.rex</a></div> |
| <h1 title="Class RexProgram" class="title">Class RexProgram</h1> |
| </div> |
| <div class="contentContainer"> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a> |
| <div class="inheritance">org.apache.calcite.rex.RexProgram</div> |
| </div> |
| <section class="description"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">RexProgram</span> |
| extends <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre> |
| <div class="block">A collection of expressions which read inputs, compute output expressions, |
| and optionally use a condition to filter rows. |
| |
| <p>Programs are immutable. It may help to use a <a href="RexProgramBuilder.html" title="class in org.apache.calcite.rex"><code>RexProgramBuilder</code></a>, |
| which has the same relationship to <a href="RexProgram.html" title="class in org.apache.calcite.rex"><code>RexProgram</code></a> as <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>StringBuilder</code></a> |
| has to <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a>. |
| |
| <p>A program can contain aggregate functions. If it does, the arguments to |
| each aggregate function must be an <a href="RexInputRef.html" title="class in org.apache.calcite.rex"><code>RexInputRef</code></a>.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="RexProgramBuilder.html" title="class in org.apache.calcite.rex"><code>RexProgramBuilder</code></a></dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li class="blockList"> |
| <section class="constructorSummary"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h2>Constructor Summary</h2> |
| <div class="memberSummary"> |
| <table> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <thead> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataType,java.util.List,java.util.List,org.apache.calcite.rex.RexLocalRef,org.apache.calcite.rel.type.RelDataType)">RexProgram</a></span>​(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> exprs, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> projects, |
| <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> condition, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a program.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li class="blockList"> |
| <section class="methodSummary"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h2>Method Summary</h2> |
| <div class="memberSummary"> |
| <div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="tableTab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t6" class="tableTab" onclick="show(32);">Deprecated Methods</button></div> |
| <div id="memberSummary_tabpanel" role="tabpanel"> |
| <table aria-labelledby="t0"> |
| <thead> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="altColor" id="i0"> |
| <td class="colFirst"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter)">collectExplainTerms</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor" id="i1"> |
| <td class="colFirst"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter,org.apache.calcite.sql.SqlExplainLevel)">collectExplainTerms</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw, |
| <a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a> level)</code></th> |
| <td class="colLast"> |
| <div class="block">Collects the expressions in this program into a list of terms and values.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i2"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsAggs()">containsAggs</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this program contains windowed aggregate functions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i3"> |
| <td class="colFirst"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(org.apache.calcite.rel.RelInput)">create</a></span>​(<a href="../rel/RelInput.html" title="interface in org.apache.calcite.rel">RelInput</a> input)</code></th> |
| <td class="colLast"> |
| <div class="block">Create a program from serialized output.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i4"> |
| <td class="colFirst"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,java.util.List,org.apache.calcite.rex.RexBuilder)">create</a></span>​(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectExprs, |
| <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> conditionExpr, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> fieldNames, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a program which calculates projections and filters rows based |
| upon a condition.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i5"> |
| <td class="colFirst"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rex.RexBuilder)">create</a></span>​(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectExprs, |
| <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> conditionExpr, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a program which calculates projections and filters rows based |
| upon a condition.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i6"> |
| <td class="colFirst"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createIdentity(org.apache.calcite.rel.type.RelDataType)">createIdentity</a></span>​(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> rowType)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates the identity program.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i7"> |
| <td class="colFirst"><code>static <a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createIdentity(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">createIdentity</a></span>​(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> rowType, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a program that projects its input fields but with possibly |
| different names for the output fields.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i8"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deduceCollations(java.util.List,int,java.util.List,java.util.List)">deduceCollations</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> outputCollations, |
| int sourceCount, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> refs, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> inputCollations)</code></th> |
| <td class="colLast"> |
| <div class="block">Given a list of expressions and a description of which are ordered, |
| populates a list of collations, sorted in natural order.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i9"> |
| <td class="colFirst"><code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#expandLocalRef(org.apache.calcite.rex.RexLocalRef)">expandLocalRef</a></span>​(<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> ref)</code></th> |
| <td class="colLast"> |
| <div class="block">Fully expands a RexLocalRef back into a pure RexNode tree containing no |
| RexLocalRefs (reversing the effect of common subexpression elimination).</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i10"> |
| <td class="colFirst"><code><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#explainCalc(org.apache.calcite.rel.RelWriter)">explainCalc</a></span>​(<a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw)</code></th> |
| <td class="colLast"> |
| <div class="block">Writes an explanation of the expressions in this program to a plan |
| writer.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i11"> |
| <td class="colFirst"><code><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#gatherExpr(org.apache.calcite.rex.RexNode)">gatherExpr</a></span>​(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor" id="i12"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCollations(java.util.List)">getCollations</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> inputCollations)</code></th> |
| <td class="colLast"> |
| <div class="block">Given a list of collations which hold for the input to this program, |
| returns a list of collations which hold for its output.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i13"> |
| <td class="colFirst"><code><a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCondition()">getCondition</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the field reference of this program's filter condition, or null |
| if there is no condition.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i14"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCorrelVariableNames()">getCorrelVariableNames</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the set of correlation variables used (read) by this program.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i15"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExprCount()">getExprCount</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the number of expressions in this program.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i16"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExprList()">getExprList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the common sub-expressions of this program.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i17"> |
| <td class="colFirst"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputRowType()">getInputRowType</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the type of the input row to the program.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i18"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>,​<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNamedProjects()">getNamedProjects</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a list of project expressions and their field names.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i19"> |
| <td class="colFirst"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOutputRowType()">getOutputRowType</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the type of the output row from this program.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i20"> |
| <td class="colFirst"><code><a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPartialMapping(int)">getPartialMapping</a></span>​(int inputFieldCount)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a partial mapping of a set of project expressions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i21"> |
| <td class="colFirst"><code><a href="../util/Permutation.html" title="class in org.apache.calcite.util">Permutation</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPermutation()">getPermutation</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i22"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProjectList()">getProjectList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an array of references to the expressions which this program is |
| to project.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i23"> |
| <td class="colFirst"><code>int[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReferenceCounts()">getReferenceCounts</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets reference counts for each expression in the program, where the |
| references are detected from later expressions in the same program, as |
| well as the project list and condition.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i24"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSourceField(int)">getSourceField</a></span>​(int outputOrdinal)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the input field that an output field is populated from, or -1 if |
| it is populated from an expression.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i25"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isConstant(org.apache.calcite.rex.RexNode)">isConstant</a></span>​(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> ref)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether an expression is constant.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i26"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNormalized(org.apache.calcite.util.Litmus,org.apache.calcite.rex.RexBuilder)">isNormalized</a></span>​(<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this program is in canonical form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i27"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNull(org.apache.calcite.rex.RexNode)">isNull</a></span>​(<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether an expression always evaluates to null.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i28"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isPermutation()">isPermutation</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this program is a permutation of its inputs.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i29"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTrivial()">isTrivial</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this program returns its input exactly.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i30"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)">isValid</a></span>​(<a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus, |
| <a href="../rel/RelNode.Context.html" title="interface in org.apache.calcite.rel">RelNode.Context</a> context)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks that this program is valid.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i31"> |
| <td class="colFirst"><code><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#normalize(org.apache.calcite.rex.RexBuilder,boolean)">normalize</a></span>​(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean simplify)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i32"> |
| <td class="colFirst"><code><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#normalize(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexSimplify)">normalize</a></span>​(<a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a simplified/normalized copy of this program.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i33"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#projectsIdentity(boolean)">projectsIdentity</a></span>​(boolean fail)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether the fields on the leading edge of the project list are |
| the input fields.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i34"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#projectsOnlyIdentity()">projectsOnlyIdentity</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this program projects precisely its input fields.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i35"> |
| <td class="colFirst"><code><a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><com.google.common.collect.ImmutableList<<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>>,​com.google.common.collect.ImmutableList<<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#split()">split</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Splits this program into a list of project expressions and a list of |
| filter expressions.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i36"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="inheritedList"> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li class="blockList"> |
| <section class="constructorDetails"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h2>Constructor Details</h2> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="<init>(org.apache.calcite.rel.type.RelDataType,java.util.List,java.util.List,org.apache.calcite.rex.RexLocalRef,org.apache.calcite.rel.type.RelDataType)">RexProgram</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="memberName">RexProgram</span>​(<span class="arguments"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> exprs, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> projects, |
| <a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> condition, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType)</span></div> |
| <div class="block">Creates a program. |
| |
| <p>The expressions must be valid: they must not contain common expressions, |
| forward references, or non-trivial aggregates.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>inputRowType</code> - Input row type</dd> |
| <dd><code>exprs</code> - Common expressions</dd> |
| <dd><code>projects</code> - Projection expressions</dd> |
| <dd><code>condition</code> - Condition expression. If null, calculator does not |
| filter rows</dd> |
| <dd><code>outputRowType</code> - Description of the row produced by the program</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li class="blockList"> |
| <section class="methodDetails"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h2>Method Details</h2> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getExprList()">getExprList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>></span> <span class="memberName">getExprList</span>()</div> |
| <div class="block">Returns the common sub-expressions of this program. |
| |
| <p>The list is never null but may be empty; each the expression in the |
| list is not null; and no further reduction into smaller common |
| sub-expressions is possible.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getProjectList()">getProjectList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>></span> <span class="memberName">getProjectList</span>()</div> |
| <div class="block">Returns an array of references to the expressions which this program is |
| to project. Never null, may be empty.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getNamedProjects()">getNamedProjects</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>,​<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>>></span> <span class="memberName">getNamedProjects</span>()</div> |
| <div class="block">Returns a list of project expressions and their field names.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getCondition()">getCondition</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a></span> <span class="memberName">getCondition</span>()</div> |
| <div class="block">Returns the field reference of this program's filter condition, or null |
| if there is no condition.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rex.RexBuilder)">create</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">create</span>​(<span class="arguments"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectExprs, |
| <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> conditionExpr, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</span></div> |
| <div class="block">Creates a program which calculates projections and filters rows based |
| upon a condition. Does not attempt to eliminate common sub-expressions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>projectExprs</code> - Project expressions</dd> |
| <dd><code>conditionExpr</code> - Condition on which to filter rows, or null if rows |
| are not to be filtered</dd> |
| <dd><code>outputRowType</code> - Output row type</dd> |
| <dd><code>rexBuilder</code> - Builder of rex expressions</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A program</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="create(org.apache.calcite.rel.type.RelDataType,java.util.List,org.apache.calcite.rex.RexNode,java.util.List,org.apache.calcite.rex.RexBuilder)">create</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">create</span>​(<span class="arguments"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> inputRowType, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projectExprs, |
| <a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> conditionExpr, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>> fieldNames, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</span></div> |
| <div class="block">Creates a program which calculates projections and filters rows based |
| upon a condition. Does not attempt to eliminate common sub-expressions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>projectExprs</code> - Project expressions</dd> |
| <dd><code>conditionExpr</code> - Condition on which to filter rows, or null if rows |
| are not to be filtered</dd> |
| <dd><code>fieldNames</code> - Names of projected fields</dd> |
| <dd><code>rexBuilder</code> - Builder of rex expressions</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A program</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="create(org.apache.calcite.rel.RelInput)">create</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">create</span>​(<span class="arguments"><a href="../rel/RelInput.html" title="interface in org.apache.calcite.rel">RelInput</a> input)</span></div> |
| <div class="block">Create a program from serialized output. |
| In this case, the input is mainly from the output json string of <a href="../rel/externalize/RelJsonWriter.html" title="class in org.apache.calcite.rel.externalize"><code>RelJsonWriter</code></a></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toString()">toString</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span> <span class="memberName">toString</span>()</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="explainCalc(org.apache.calcite.rel.RelWriter)">explainCalc</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span> <span class="memberName">explainCalc</span>​(<span class="arguments"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw)</span></div> |
| <div class="block">Writes an explanation of the expressions in this program to a plan |
| writer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pw</code> - Plan writer</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter)">collectExplainTerms</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span> <span class="memberName">collectExplainTerms</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw)</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectExplainTerms(java.lang.String,org.apache.calcite.rel.RelWriter,org.apache.calcite.sql.SqlExplainLevel)">collectExplainTerms</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a></span> <span class="memberName">collectExplainTerms</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> prefix, |
| <a href="../rel/RelWriter.html" title="interface in org.apache.calcite.rel">RelWriter</a> pw, |
| <a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a> level)</span></div> |
| <div class="block">Collects the expressions in this program into a list of terms and values.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>prefix</code> - Prefix for term names, usually the empty string, but useful |
| if a relational expression contains more than one program</dd> |
| <dd><code>pw</code> - Plan writer</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getExprCount()">getExprCount</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">int</span> <span class="memberName">getExprCount</span>()</div> |
| <div class="block">Returns the number of expressions in this program.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="createIdentity(org.apache.calcite.rel.type.RelDataType)">createIdentity</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">createIdentity</span>​(<span class="arguments"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> rowType)</span></div> |
| <div class="block">Creates the identity program.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="createIdentity(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType)">createIdentity</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">createIdentity</span>​(<span class="arguments"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> rowType, |
| <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> outputRowType)</span></div> |
| <div class="block">Creates a program that projects its input fields but with possibly |
| different names for the output fields.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getInputRowType()">getInputRowType</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span> <span class="memberName">getInputRowType</span>()</div> |
| <div class="block">Returns the type of the input row to the program.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>input row type</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="containsAggs()">containsAggs</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">containsAggs</span>()</div> |
| <div class="block">Returns whether this program contains windowed aggregate functions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this program contains windowed aggregate functions</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getOutputRowType()">getOutputRowType</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></span> <span class="memberName">getOutputRowType</span>()</div> |
| <div class="block">Returns the type of the output row from this program.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>output row type</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isValid(org.apache.calcite.util.Litmus,org.apache.calcite.rel.RelNode.Context)">isValid</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isValid</span>​(<span class="arguments"><a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus, |
| <a href="../rel/RelNode.Context.html" title="interface in org.apache.calcite.rel">RelNode.Context</a> context)</span></div> |
| <div class="block">Checks that this program is valid. |
| |
| <p>If <code>fail</code> is true, executes <code>assert false</code>, so |
| will throw an <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>AssertionError</code></a> if assertions are enabled. If <code> |
| fail</code> is false, merely returns whether the program is valid.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>litmus</code> - What to do if an error is detected</dd> |
| <dd><code>context</code> - Context of enclosing <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a>, for validity checking, |
| or null if not known</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether the program is valid</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isNull(org.apache.calcite.rex.RexNode)">isNull</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isNull</span>​(<span class="arguments"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</span></div> |
| <div class="block">Returns whether an expression always evaluates to null. |
| |
| <p>Like <a href="RexUtil.html#isNull(org.apache.calcite.rex.RexNode)"><code>RexUtil.isNull(RexNode)</code></a>, null literals are null, and |
| casts of null literals are null. But this method also regards references |
| to null expressions as null.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expr</code> - Expression</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether expression always evaluates to null</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="expandLocalRef(org.apache.calcite.rex.RexLocalRef)">expandLocalRef</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></span> <span class="memberName">expandLocalRef</span>​(<span class="arguments"><a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a> ref)</span></div> |
| <div class="block">Fully expands a RexLocalRef back into a pure RexNode tree containing no |
| RexLocalRefs (reversing the effect of common subexpression elimination). |
| For example, <code>program.expandLocalRef(program.getCondition())</code> |
| will return the expansion of a program's condition.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ref</code> - a RexLocalRef from this program</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>expanded form</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="split()">split</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../util/Pair.html" title="class in org.apache.calcite.util">Pair</a><com.google.common.collect.ImmutableList<<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>>,​com.google.common.collect.ImmutableList<<a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>>></span> <span class="memberName">split</span>()</div> |
| <div class="block">Splits this program into a list of project expressions and a list of |
| filter expressions. |
| |
| <p>Neither list is null. |
| The filters are evaluated first.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getCollations(java.util.List)">getCollations</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>></span> <span class="memberName">getCollations</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> inputCollations)</span></div> |
| <div class="block">Given a list of collations which hold for the input to this program, |
| returns a list of collations which hold for its output. The result is |
| mutable and sorted.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="deduceCollations(java.util.List,int,java.util.List,java.util.List)">deduceCollations</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="returnType">void</span> <span class="memberName">deduceCollations</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> outputCollations, |
| int sourceCount, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="RexLocalRef.html" title="class in org.apache.calcite.rex">RexLocalRef</a>> refs, |
| <a href="https://docs.oracle.com/javase/9/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><<a href="../rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a>> inputCollations)</span></div> |
| <div class="block">Given a list of expressions and a description of which are ordered, |
| populates a list of collations, sorted in natural order.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="projectsIdentity(boolean)">projectsIdentity</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">projectsIdentity</span>​(<span class="arguments">boolean fail)</span></div> |
| <div class="block">Returns whether the fields on the leading edge of the project list are |
| the input fields.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fail</code> - Whether to throw an assert failure if does not project |
| identity</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="projectsOnlyIdentity()">projectsOnlyIdentity</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">projectsOnlyIdentity</span>()</div> |
| <div class="block">Returns whether this program projects precisely its input fields. It may |
| or may not apply a condition.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isTrivial()">isTrivial</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isTrivial</span>()</div> |
| <div class="block">Returns whether this program returns its input exactly. |
| |
| <p>This is a stronger condition than <a href="#projectsIdentity(boolean)"><code>projectsIdentity(boolean)</code></a>.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getReferenceCounts()">getReferenceCounts</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">int[]</span> <span class="memberName">getReferenceCounts</span>()</div> |
| <div class="block">Gets reference counts for each expression in the program, where the |
| references are detected from later expressions in the same program, as |
| well as the project list and condition. Expressions with references |
| counts greater than 1 are true common sub-expressions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of reference counts; the ith element in the returned array |
| is the number of references to getExprList()[i]</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isConstant(org.apache.calcite.rex.RexNode)">isConstant</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isConstant</span>​(<span class="arguments"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> ref)</span></div> |
| <div class="block">Returns whether an expression is constant.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="gatherExpr(org.apache.calcite.rex.RexNode)">gatherExpr</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></span> <span class="memberName">gatherExpr</span>​(<span class="arguments"><a href="RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getSourceField(int)">getSourceField</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">int</span> <span class="memberName">getSourceField</span>​(<span class="arguments">int outputOrdinal)</span></div> |
| <div class="block">Returns the input field that an output field is populated from, or -1 if |
| it is populated from an expression.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isPermutation()">isPermutation</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isPermutation</span>()</div> |
| <div class="block">Returns whether this program is a permutation of its inputs.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getPermutation()">getPermutation</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../util/Permutation.html" title="class in org.apache.calcite.util">Permutation</a></span> <span class="memberName">getPermutation</span>()</div> |
| <div class="block">Returns a permutation, if this program is a permutation, otherwise null.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getCorrelVariableNames()">getCorrelVariableNames</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>></span> <span class="memberName">getCorrelVariableNames</span>()</div> |
| <div class="block">Returns the set of correlation variables used (read) by this program.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>set of correlation variable names</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="isNormalized(org.apache.calcite.util.Litmus,org.apache.calcite.rex.RexBuilder)">isNormalized</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType">boolean</span> <span class="memberName">isNormalized</span>​(<span class="arguments"><a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus, |
| <a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder)</span></div> |
| <div class="block">Returns whether this program is in canonical form.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>litmus</code> - What to do if an error is detected (program is not in |
| canonical form)</dd> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether in canonical form</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="normalize(org.apache.calcite.rex.RexBuilder,org.apache.calcite.rex.RexSimplify)">normalize</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">normalize</span>​(<span class="arguments"><a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="RexSimplify.html" title="class in org.apache.calcite.rex">RexSimplify</a> simplify)</span></div> |
| <div class="block">Creates a simplified/normalized copy of this program.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rexBuilder</code> - Rex builder</dd> |
| <dd><code>simplify</code> - Simplifier to simplify (in addition to normalizing), |
| or null to not simplify</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Normalized program</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="normalize(org.apache.calcite.rex.RexBuilder,boolean)">normalize</a></h3> |
| <div class="memberSignature"><span class="annotations"><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| </span><span class="modifiers">public</span> <span class="returnType"><a href="RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a></span> <span class="memberName">normalize</span>​(<span class="arguments"><a href="RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| boolean simplify)</span></div> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="getPartialMapping(int)">getPartialMapping</a></h3> |
| <div class="memberSignature"><span class="modifiers">public</span> <span class="returnType"><a href="../util/mapping/Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></span> <span class="memberName">getPartialMapping</span>​(<span class="arguments">int inputFieldCount)</span></div> |
| <div class="block">Returns a partial mapping of a set of project expressions. |
| |
| <p>The mapping is an inverse function. |
| Every target has a source field, but |
| a source might have 0, 1 or more targets. |
| Project expressions that do not consist of |
| a mapping are ignored.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>inputFieldCount</code> - Number of input fields</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Mapping of a set of project expressions, never null</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="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"> |
| <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> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |