blob: 84c32cd085102b4f928484d9ff857a0a393f77a0 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Prepare (Apache Calcite API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Prepare (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":10,"i4":6,"i5":6,"i6":10,"i7":6,"i8":6,"i9":6,"i10":6,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Prepare.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.prepare</a></div>
<h2 title="Class Prepare" class="title">Class Prepare</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.prepare.Prepare</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="CalcitePrepareImpl.CalcitePreparingStmt.html" title="class in org.apache.calcite.prepare">CalcitePrepareImpl.CalcitePreparingStmt</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">Prepare</span>
extends java.lang.Object</pre>
<div class="block">Abstract base for classes that implement
the process of preparing and executing SQL expressions.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.AbstractPreparingTable.html" title="class in org.apache.calcite.prepare">Prepare.AbstractPreparingTable</a></span></code></th>
<td class="colLast">
<div class="block">Abstract implementation of <a href="Prepare.PreparingTable.html" title="interface in org.apache.calcite.prepare"><code>Prepare.PreparingTable</code></a> with an implementation
for <a href="Prepare.AbstractPreparingTable.html#columnHasDefaultValue(org.apache.calcite.rel.type.RelDataType,int,org.apache.calcite.sql2rel.InitializerContext)"><code>Prepare.AbstractPreparingTable.columnHasDefaultValue(org.apache.calcite.rel.type.RelDataType, int, org.apache.calcite.sql2rel.InitializerContext)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a></span></code></th>
<td class="colLast">
<div class="block">Interface by which validator and planner can read table metadata.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.Materialization.html" title="class in org.apache.calcite.prepare">Prepare.Materialization</a></span></code></th>
<td class="colLast">
<div class="block">Describes that a given SQL query is materialized by a given table.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.PreparedExplain.html" title="class in org.apache.calcite.prepare">Prepare.PreparedExplain</a></span></code></th>
<td class="colLast">
<div class="block">PreparedExplanation is a PreparedResult for an EXPLAIN PLAN statement.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a></span></code></th>
<td class="colLast">
<div class="block">Result of a call to <a href="#prepareSql(org.apache.calcite.sql.SqlNode,java.lang.Class,org.apache.calcite.sql.validate.SqlValidator,boolean)"><code>prepareSql(org.apache.calcite.sql.SqlNode, java.lang.Class, org.apache.calcite.sql.validate.SqlValidator, boolean)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.PreparedResultImpl.html" title="class in org.apache.calcite.prepare">Prepare.PreparedResultImpl</a></span></code></th>
<td class="colLast">
<div class="block">Abstract implementation of <a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare"><code>Prepare.PreparedResult</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Prepare.PreparingTable.html" title="interface in org.apache.calcite.prepare">Prepare.PreparingTable</a></span></code></th>
<td class="colLast">
<div class="block">Definition of a table, for the purposes of the validator and planner.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#catalogReader">catalogReader</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../jdbc/CalcitePrepare.Context.html" title="interface in org.apache.calcite.jdbc">CalcitePrepare.Context</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#context">context</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.util.List&lt;java.util.List&lt;java.lang.String&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fieldOrigins">fieldOrigins</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static org.slf4j.Logger</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LOGGER">LOGGER</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <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="#parameterRowType">parameterRowType</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../plan/Convention.html" title="interface in org.apache.calcite.plan">Convention</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resultConvention">resultConvention</a></span></code></th>
<td class="colLast">
<div class="block">Convention via which results should be returned by execution.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../util/TryThreadLocal.html" title="class in org.apache.calcite.util">TryThreadLocal</a>&lt;java.lang.Boolean&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#THREAD_EXPAND">THREAD_EXPAND</a></span></code></th>
<td class="colLast">
<div class="block">Temporary, until
<a href="https://issues.apache.org/jira/browse/CALCITE-1045">[CALCITE-1045]
Decorrelate sub-queries in Project and Join</a> is fixed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../util/TryThreadLocal.html" title="class in org.apache.calcite.util">TryThreadLocal</a>&lt;java.lang.Boolean&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#THREAD_TRIM">THREAD_TRIM</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../util/trace/CalciteTimingTracer.html" title="class in org.apache.calcite.util.trace">CalciteTimingTracer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#timingTracer">timingTracer</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.jdbc.CalcitePrepare.Context,org.apache.calcite.prepare.Prepare.CatalogReader,org.apache.calcite.plan.Convention)">Prepare</a></span>&#8203;(<a href="../jdbc/CalcitePrepare.Context.html" title="interface in org.apache.calcite.jdbc">CalcitePrepare.Context</a>&nbsp;context,
<a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a>&nbsp;catalogReader,
<a href="../plan/Convention.html" title="interface in org.apache.calcite.plan">Convention</a>&nbsp;resultConvention)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected abstract <a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createPreparedExplanation(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.RelRoot,org.apache.calcite.sql.SqlExplainFormat,org.apache.calcite.sql.SqlExplainLevel)">createPreparedExplanation</a></span>&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;resultType,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;parameterRowType,
<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root,
<a href="../sql/SqlExplainFormat.html" title="enum in org.apache.calcite.sql">SqlExplainFormat</a>&nbsp;format,
<a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a>&nbsp;detailLevel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decorrelate(org.apache.calcite.sql2rel.SqlToRelConverter,org.apache.calcite.sql.SqlNode,org.apache.calcite.rel.RelNode)">decorrelate</a></span>&#8203;(<a href="../sql2rel/SqlToRelConverter.html" title="class in org.apache.calcite.sql2rel">SqlToRelConverter</a>&nbsp;sqlToRelConverter,
<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;query,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>abstract <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flattenTypes(org.apache.calcite.rel.RelNode,boolean)">flattenTypes</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel,
boolean&nbsp;restructure)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDesiredRootTraitSet(org.apache.calcite.rel.RelRoot)">getDesiredRootTraitSet</a></span>&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected abstract java.util.List&lt;<a href="../jdbc/CalciteSchema.LatticeEntry.html" title="class in org.apache.calcite.jdbc">CalciteSchema.LatticeEntry</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLattices()">getLattices</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected abstract java.util.List&lt;<a href="Prepare.Materialization.html" title="class in org.apache.calcite.prepare">Prepare.Materialization</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaterializations()">getMaterializations</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="../tools/Program.html" title="interface in org.apache.calcite.tools">Program</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProgram()">getProgram</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="../sql2rel/SqlToRelConverter.html" title="class in org.apache.calcite.sql2rel">SqlToRelConverter</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSqlToRelConverter(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.prepare.Prepare.CatalogReader,org.apache.calcite.sql2rel.SqlToRelConverter.Config)">getSqlToRelConverter</a></span>&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a>&nbsp;catalogReader,
<a href="../sql2rel/SqlToRelConverter.Config.html" title="interface in org.apache.calcite.sql2rel">SqlToRelConverter.Config</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Protected method to allow subclasses to override construction of
SqlToRelConverter.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected abstract <a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSqlValidator()">getSqlValidator</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#implement(org.apache.calcite.rel.RelRoot)">implement</a></span>&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</code></th>
<td class="colLast">
<div class="block">Implements a physical query plan.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected abstract void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#init(java.lang.Class)">init</a></span>&#8203;(java.lang.Class&nbsp;runtimeContextClass)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected <a href="../rel/core/TableModify.Operation.html" title="enum in org.apache.calcite.rel.core">TableModify.Operation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mapTableModOp(boolean,org.apache.calcite.sql.SqlKind)">mapTableModOp</a></span>&#8203;(boolean&nbsp;isDml,
<a href="../sql/SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a>&nbsp;sqlKind)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>protected <a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#optimize(org.apache.calcite.rel.RelRoot,java.util.List,java.util.List)">optimize</a></span>&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root,
java.util.List&lt;<a href="Prepare.Materialization.html" title="class in org.apache.calcite.prepare">Prepare.Materialization</a>&gt;&nbsp;materializations,
java.util.List&lt;<a href="../jdbc/CalciteSchema.LatticeEntry.html" title="class in org.apache.calcite.jdbc">CalciteSchema.LatticeEntry</a>&gt;&nbsp;lattices)</code></th>
<td class="colLast">
<div class="block">Optimizes a query plan.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prepareSql(org.apache.calcite.sql.SqlNode,java.lang.Class,org.apache.calcite.sql.validate.SqlValidator,boolean)">prepareSql</a></span>&#8203;(<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlQuery,
java.lang.Class&nbsp;runtimeContextClass,
<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
boolean&nbsp;needsValidation)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prepareSql(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode,java.lang.Class,org.apache.calcite.sql.validate.SqlValidator,boolean)">prepareSql</a></span>&#8203;(<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlQuery,
<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlNodeOriginal,
java.lang.Class&nbsp;runtimeContextClass,
<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
boolean&nbsp;needsValidation)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldTrim(org.apache.calcite.rel.RelNode)">shouldTrim</a></span>&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected <a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trimUnusedFields(org.apache.calcite.rel.RelRoot)">trimUnusedFields</a></span>&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</code></th>
<td class="colLast">
<div class="block">Walks over a tree of relational expressions, replacing each
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> with a 'slimmed down' relational
expression that projects
only the columns required by its consumer.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="LOGGER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOGGER</h4>
<pre>protected static final&nbsp;org.slf4j.Logger LOGGER</pre>
</li>
</ul>
<a id="context">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>context</h4>
<pre>protected final&nbsp;<a href="../jdbc/CalcitePrepare.Context.html" title="interface in org.apache.calcite.jdbc">CalcitePrepare.Context</a> context</pre>
</li>
</ul>
<a id="catalogReader">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>catalogReader</h4>
<pre>protected final&nbsp;<a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a> catalogReader</pre>
</li>
</ul>
<a id="resultConvention">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resultConvention</h4>
<pre>protected final&nbsp;<a href="../plan/Convention.html" title="interface in org.apache.calcite.plan">Convention</a> resultConvention</pre>
<div class="block">Convention via which results should be returned by execution.</div>
</li>
</ul>
<a id="timingTracer">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timingTracer</h4>
<pre>protected&nbsp;<a href="../util/trace/CalciteTimingTracer.html" title="class in org.apache.calcite.util.trace">CalciteTimingTracer</a> timingTracer</pre>
</li>
</ul>
<a id="fieldOrigins">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fieldOrigins</h4>
<pre>protected&nbsp;java.util.List&lt;java.util.List&lt;java.lang.String&gt;&gt; fieldOrigins</pre>
</li>
</ul>
<a id="parameterRowType">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parameterRowType</h4>
<pre>protected&nbsp;<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> parameterRowType</pre>
</li>
</ul>
<a id="THREAD_TRIM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>THREAD_TRIM</h4>
<pre>public static final&nbsp;<a href="../util/TryThreadLocal.html" title="class in org.apache.calcite.util">TryThreadLocal</a>&lt;java.lang.Boolean&gt; THREAD_TRIM</pre>
</li>
</ul>
<a id="THREAD_EXPAND">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>THREAD_EXPAND</h4>
<pre>public static final&nbsp;<a href="../util/TryThreadLocal.html" title="class in org.apache.calcite.util">TryThreadLocal</a>&lt;java.lang.Boolean&gt; THREAD_EXPAND</pre>
<div class="block">Temporary, until
<a href="https://issues.apache.org/jira/browse/CALCITE-1045">[CALCITE-1045]
Decorrelate sub-queries in Project and Join</a> is fixed.
<p>The default is false, meaning do not expand queries during sql-to-rel,
but a few tests override and set it to true. After CALCITE-1045
is fixed, remove those overrides and use false everywhere.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.calcite.jdbc.CalcitePrepare.Context,org.apache.calcite.prepare.Prepare.CatalogReader,org.apache.calcite.plan.Convention)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Prepare</h4>
<pre>public&nbsp;Prepare&#8203;(<a href="../jdbc/CalcitePrepare.Context.html" title="interface in org.apache.calcite.jdbc">CalcitePrepare.Context</a>&nbsp;context,
<a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a>&nbsp;catalogReader,
<a href="../plan/Convention.html" title="interface in org.apache.calcite.plan">Convention</a>&nbsp;resultConvention)</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="createPreparedExplanation(org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.RelRoot,org.apache.calcite.sql.SqlExplainFormat,org.apache.calcite.sql.SqlExplainLevel)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPreparedExplanation</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a>&nbsp;createPreparedExplanation&#8203;(<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;resultType,
<a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a>&nbsp;parameterRowType,
<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root,
<a href="../sql/SqlExplainFormat.html" title="enum in org.apache.calcite.sql">SqlExplainFormat</a>&nbsp;format,
<a href="../sql/SqlExplainLevel.html" title="enum in org.apache.calcite.sql">SqlExplainLevel</a>&nbsp;detailLevel)</pre>
</li>
</ul>
<a id="optimize(org.apache.calcite.rel.RelRoot,java.util.List,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optimize</h4>
<pre class="methodSignature">protected&nbsp;<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;optimize&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root,
java.util.List&lt;<a href="Prepare.Materialization.html" title="class in org.apache.calcite.prepare">Prepare.Materialization</a>&gt;&nbsp;materializations,
java.util.List&lt;<a href="../jdbc/CalciteSchema.LatticeEntry.html" title="class in org.apache.calcite.jdbc">CalciteSchema.LatticeEntry</a>&gt;&nbsp;lattices)</pre>
<div class="block">Optimizes a query plan.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>root</code> - Root of relational expression tree</dd>
<dd><code>materializations</code> - Tables known to be populated with a given query</dd>
<dd><code>lattices</code> - Lattices</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an equivalent optimized relational expression</dd>
</dl>
</li>
</ul>
<a id="getProgram()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgram</h4>
<pre class="methodSignature">protected&nbsp;<a href="../tools/Program.html" title="interface in org.apache.calcite.tools">Program</a>&nbsp;getProgram()</pre>
</li>
</ul>
<a id="getDesiredRootTraitSet(org.apache.calcite.rel.RelRoot)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDesiredRootTraitSet</h4>
<pre class="methodSignature">protected&nbsp;<a href="../plan/RelTraitSet.html" title="class in org.apache.calcite.plan">RelTraitSet</a>&nbsp;getDesiredRootTraitSet&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</pre>
</li>
</ul>
<a id="implement(org.apache.calcite.rel.RelRoot)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>implement</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a>&nbsp;implement&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</pre>
<div class="block">Implements a physical query plan.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>root</code> - Root of the relational expression tree</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an executable plan</dd>
</dl>
</li>
</ul>
<a id="prepareSql(org.apache.calcite.sql.SqlNode,java.lang.Class,org.apache.calcite.sql.validate.SqlValidator,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareSql</h4>
<pre class="methodSignature">public&nbsp;<a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a>&nbsp;prepareSql&#8203;(<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlQuery,
java.lang.Class&nbsp;runtimeContextClass,
<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
boolean&nbsp;needsValidation)</pre>
</li>
</ul>
<a id="prepareSql(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode,java.lang.Class,org.apache.calcite.sql.validate.SqlValidator,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepareSql</h4>
<pre class="methodSignature">public&nbsp;<a href="Prepare.PreparedResult.html" title="interface in org.apache.calcite.prepare">Prepare.PreparedResult</a>&nbsp;prepareSql&#8203;(<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlQuery,
<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;sqlNodeOriginal,
java.lang.Class&nbsp;runtimeContextClass,
<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
boolean&nbsp;needsValidation)</pre>
</li>
</ul>
<a id="mapTableModOp(boolean,org.apache.calcite.sql.SqlKind)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapTableModOp</h4>
<pre class="methodSignature">protected&nbsp;<a href="../rel/core/TableModify.Operation.html" title="enum in org.apache.calcite.rel.core">TableModify.Operation</a>&nbsp;mapTableModOp&#8203;(boolean&nbsp;isDml,
<a href="../sql/SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a>&nbsp;sqlKind)</pre>
</li>
</ul>
<a id="getSqlToRelConverter(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.prepare.Prepare.CatalogReader,org.apache.calcite.sql2rel.SqlToRelConverter.Config)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSqlToRelConverter</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="../sql2rel/SqlToRelConverter.html" title="class in org.apache.calcite.sql2rel">SqlToRelConverter</a>&nbsp;getSqlToRelConverter&#8203;(<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;validator,
<a href="Prepare.CatalogReader.html" title="interface in org.apache.calcite.prepare">Prepare.CatalogReader</a>&nbsp;catalogReader,
<a href="../sql2rel/SqlToRelConverter.Config.html" title="interface in org.apache.calcite.sql2rel">SqlToRelConverter.Config</a>&nbsp;config)</pre>
<div class="block">Protected method to allow subclasses to override construction of
SqlToRelConverter.</div>
</li>
</ul>
<a id="flattenTypes(org.apache.calcite.rel.RelNode,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flattenTypes</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;flattenTypes&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel,
boolean&nbsp;restructure)</pre>
</li>
</ul>
<a id="decorrelate(org.apache.calcite.sql2rel.SqlToRelConverter,org.apache.calcite.sql.SqlNode,org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decorrelate</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;decorrelate&#8203;(<a href="../sql2rel/SqlToRelConverter.html" title="class in org.apache.calcite.sql2rel">SqlToRelConverter</a>&nbsp;sqlToRelConverter,
<a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>&nbsp;query,
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel)</pre>
</li>
</ul>
<a id="getMaterializations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaterializations</h4>
<pre class="methodSignature">protected abstract&nbsp;java.util.List&lt;<a href="Prepare.Materialization.html" title="class in org.apache.calcite.prepare">Prepare.Materialization</a>&gt;&nbsp;getMaterializations()</pre>
</li>
</ul>
<a id="getLattices()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLattices</h4>
<pre class="methodSignature">protected abstract&nbsp;java.util.List&lt;<a href="../jdbc/CalciteSchema.LatticeEntry.html" title="class in org.apache.calcite.jdbc">CalciteSchema.LatticeEntry</a>&gt;&nbsp;getLattices()</pre>
</li>
</ul>
<a id="trimUnusedFields(org.apache.calcite.rel.RelRoot)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimUnusedFields</h4>
<pre class="methodSignature">protected&nbsp;<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;trimUnusedFields&#8203;(<a href="../rel/RelRoot.html" title="class in org.apache.calcite.rel">RelRoot</a>&nbsp;root)</pre>
<div class="block">Walks over a tree of relational expressions, replacing each
<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> with a 'slimmed down' relational
expression that projects
only the columns required by its consumer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>root</code> - Root of relational expression tree</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Trimmed relational expression</dd>
</dl>
</li>
</ul>
<a id="shouldTrim(org.apache.calcite.rel.RelNode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldTrim</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;shouldTrim&#8203;(<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&nbsp;rootRel)</pre>
</li>
</ul>
<a id="init(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre class="methodSignature">protected abstract&nbsp;void&nbsp;init&#8203;(java.lang.Class&nbsp;runtimeContextClass)</pre>
</li>
</ul>
<a id="getSqlValidator()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getSqlValidator</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="../sql/validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a>&nbsp;getSqlValidator()</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Prepare.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>