blob: 989cb58c0b8b479a4bed47f8606eb28ed37e41e3 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Hook (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="Hook (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":42,"i2":42,"i3":10,"i4":10,"i5":41,"i6":9,"i7":10,"i8":10,"i9":10,"i10":9,"i11":9};
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 = "../../../../";
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/Hook.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="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li><a href="#field.detail">Field</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.runtime</a></div>
<h2 title="Enum Hook" class="title">Enum Hook</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Enum&lt;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.runtime.Hook</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.io.Serializable</code>, <code>java.lang.Comparable&lt;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>&gt;</code></dd>
</dl>
<hr>
<pre>public enum <span class="typeNameLabel">Hook</span>
extends java.lang.Enum&lt;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>&gt;</pre>
<div class="block">Collection of hooks that can be set by observers and are executed at various
parts of the query preparation process.
<p>For testing and debugging rather than for end-users.</p></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 interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a></span></code></th>
<td class="colLast">
<div class="block">Removes a Hook after use.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="enum.constant.summary">
<!-- -->
</a>
<h3>Enum Constant Summary</h3>
<table class="memberSummary">
<caption><span>Enum Constants</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Enum Constant</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#CONVERTED">CONVERTED</a></span></code></th>
<td class="colLast">
<div class="block">Called with the output of sql-to-rel-converter.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#CREATE_MATERIALIZATION">CREATE_MATERIALIZATION</a></span></code></th>
<td class="colLast">
<div class="block">Called when materialization is created.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#CURRENT_TIME">CURRENT_TIME</a></span></code></th>
<td class="colLast">
<div class="block">Called to get the current time.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#ENABLE_BINDABLE">ENABLE_BINDABLE</a></span></code></th>
<td class="colLast">
<div class="block">Returns a boolean value, whether the return convention should be
<a href="../interpreter/BindableConvention.html" title="enum in org.apache.calcite.interpreter"><code>BindableConvention</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#EXPRESSION_REDUCER">EXPRESSION_REDUCER</a></span></code></th>
<td class="colLast">
<div class="block">Called when a constant expression is being reduced.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#JAVA_PLAN">JAVA_PLAN</a></span></code></th>
<td class="colLast">
<div class="block">Called with the generated Java plan, just before it is compiled by
Janino.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#PARSE_TREE">PARSE_TREE</a></span></code></th>
<td class="colLast">
<div class="block">Called with the SQL string and parse tree, in an array.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#PLANNER">PLANNER</a></span></code></th>
<td class="colLast">
<div class="block">Called with the created planner.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#PROGRAM">PROGRAM</a></span></code></th>
<td class="colLast">
<div class="block">Called to create a Program to optimize the statement.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#QUERY_PLAN">QUERY_PLAN</a></span></code></th>
<td class="colLast">
<div class="block">Called with a query that has been generated to send to a back-end system.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#REL_BUILDER_SIMPLIFY">REL_BUILDER_SIMPLIFY</a></span></code></th>
<td class="colLast">
<div class="block">Returns a boolean value, whether RelBuilder should simplify expressions.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#STANDARD_STREAMS">STANDARD_STREAMS</a></span></code></th>
<td class="colLast">
<div class="block">Called to get stdin, stdout, stderr.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#STRING_TO_QUERY">STRING_TO_QUERY</a></span></code></th>
<td class="colLast">
<div class="block">Converts a SQL string to a
<a href="../jdbc/CalcitePrepare.Query.html" title="class in org.apache.calcite.jdbc"><code>CalcitePrepare.Query</code></a> object.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#SUB">SUB</a></span></code></th>
<td class="colLast">
<div class="block">Called by the planner after substituting a materialization.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#TRIMMED">TRIMMED</a></span></code></th>
<td class="colLast">
<div class="block">Called after de-correlation and field trimming, but before
optimization.</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>private java.util.List&lt;java.util.function.Consumer&lt;java.lang.Object&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#handlers">handlers</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private java.lang.ThreadLocal&lt;java.util.List&lt;java.util.function.Consumer&lt;java.lang.Object&gt;&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#threadHandlers">threadHandlers</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">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Hook</a></span>()</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>&lt;T&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(java.util.function.Consumer)">add</a></span>&#8203;(java.util.function.Consumer&lt;T&gt;&nbsp;handler)</code></th>
<td class="colLast">
<div class="block">Adds a handler for this Hook.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>&lt;T,&#8203;R&gt;<br><a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(java.util.function.Function)">add</a></span>&#8203;(java.util.function.Function&lt;T,&#8203;R&gt;&nbsp;handler)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#add(java.util.function.Consumer)"><code>add(Consumer)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>&lt;T,&#8203;R&gt;<br><a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addThread(com.google.common.base.Function)">addThread</a></span>&#8203;(com.google.common.base.Function&lt;T,&#8203;R&gt;&nbsp;handler)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#addThread(java.util.function.Consumer)"><code>addThread(Consumer)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addThread(java.util.function.Consumer)">addThread</a></span>&#8203;(java.util.function.Consumer&lt;T&gt;&nbsp;handler)</code></th>
<td class="colLast">
<div class="block">Adds a handler for this thread.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;V&gt;&nbsp;V</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#get(V)">get</a></span>&#8203;(V&nbsp;defaultValue)</code></th>
<td class="colLast">
<div class="block">Returns the value of a property hook.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static &lt;V&gt;&nbsp;com.google.common.base.Function&lt;<a href="../util/Holder.html" title="class in org.apache.calcite.util">Holder</a>&lt;V&gt;,&#8203;java.lang.Void&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#property(V)">property</a></span>&#8203;(V&nbsp;v)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#propertyJ(V)"><code>propertyJ(V)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static &lt;V&gt;&nbsp;java.util.function.Consumer&lt;<a href="../util/Holder.html" title="class in org.apache.calcite.util">Holder</a>&lt;V&gt;&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#propertyJ(V)">propertyJ</a></span>&#8203;(V&nbsp;v)</code></th>
<td class="colLast">
<div class="block">Returns a function that, when a hook is called, will "return" a given
value.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(java.util.function.Consumer)">remove</a></span>&#8203;(java.util.function.Consumer&nbsp;handler)</code></th>
<td class="colLast">
<div class="block">Removes a handler from this Hook.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeThread(java.util.function.Consumer)">removeThread</a></span>&#8203;(java.util.function.Consumer&nbsp;handler)</code></th>
<td class="colLast">
<div class="block">Removes a thread handler from this Hook.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#run(java.lang.Object)">run</a></span>&#8203;(java.lang.Object&nbsp;arg)</code></th>
<td class="colLast">
<div class="block">Runs all handlers registered for this Hook, with the given argument.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#valueOf(java.lang.String)">valueOf</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Returns the enum constant of this type with the specified name.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#values()">values</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Enum">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Enum</h3>
<code>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</code></li>
</ul>
<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>getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="enum.constant.detail">
<!-- -->
</a>
<h3>Enum Constant Detail</h3>
<a id="CURRENT_TIME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CURRENT_TIME</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> CURRENT_TIME</pre>
<div class="block">Called to get the current time. Use this to return a predictable time
in tests.</div>
</li>
</ul>
<a id="STANDARD_STREAMS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STANDARD_STREAMS</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> STANDARD_STREAMS</pre>
<div class="block">Called to get stdin, stdout, stderr.
Use this to re-assign streams in tests.</div>
</li>
</ul>
<a id="REL_BUILDER_SIMPLIFY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>REL_BUILDER_SIMPLIFY</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> REL_BUILDER_SIMPLIFY</pre>
<div class="block">Returns a boolean value, whether RelBuilder should simplify expressions.
Default true.</div>
</li>
</ul>
<a id="ENABLE_BINDABLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ENABLE_BINDABLE</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> ENABLE_BINDABLE</pre>
<div class="block">Returns a boolean value, whether the return convention should be
<a href="../interpreter/BindableConvention.html" title="enum in org.apache.calcite.interpreter"><code>BindableConvention</code></a>.
Default false.</div>
</li>
</ul>
<a id="PARSE_TREE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PARSE_TREE</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> PARSE_TREE</pre>
<div class="block">Called with the SQL string and parse tree, in an array.</div>
</li>
</ul>
<a id="STRING_TO_QUERY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STRING_TO_QUERY</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> STRING_TO_QUERY</pre>
<div class="block">Converts a SQL string to a
<a href="../jdbc/CalcitePrepare.Query.html" title="class in org.apache.calcite.jdbc"><code>CalcitePrepare.Query</code></a> object. This hook is
an opportunity to execute a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> query
plan in the JDBC driver rather than the usual SQL string.</div>
</li>
</ul>
<a id="JAVA_PLAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>JAVA_PLAN</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> JAVA_PLAN</pre>
<div class="block">Called with the generated Java plan, just before it is compiled by
Janino.</div>
</li>
</ul>
<a id="CONVERTED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONVERTED</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> CONVERTED</pre>
<div class="block">Called with the output of sql-to-rel-converter.</div>
</li>
</ul>
<a id="PLANNER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PLANNER</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> PLANNER</pre>
<div class="block">Called with the created planner.</div>
</li>
</ul>
<a id="TRIMMED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TRIMMED</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> TRIMMED</pre>
<div class="block">Called after de-correlation and field trimming, but before
optimization.</div>
</li>
</ul>
<a id="SUB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SUB</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> SUB</pre>
<div class="block">Called by the planner after substituting a materialization.</div>
</li>
</ul>
<a id="EXPRESSION_REDUCER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXPRESSION_REDUCER</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> EXPRESSION_REDUCER</pre>
<div class="block">Called when a constant expression is being reduced.</div>
</li>
</ul>
<a id="PROGRAM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PROGRAM</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> PROGRAM</pre>
<div class="block">Called to create a Program to optimize the statement.</div>
</li>
</ul>
<a id="CREATE_MATERIALIZATION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CREATE_MATERIALIZATION</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> CREATE_MATERIALIZATION</pre>
<div class="block">Called when materialization is created.</div>
</li>
</ul>
<a id="QUERY_PLAN">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>QUERY_PLAN</h4>
<pre>public static final&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a> QUERY_PLAN</pre>
<div class="block">Called with a query that has been generated to send to a back-end system.
The query might be a SQL string (for the JDBC adapter), a list of Mongo
pipeline expressions (for the MongoDB adapter), et cetera.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="handlers">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handlers</h4>
<pre>private final&nbsp;java.util.List&lt;java.util.function.Consumer&lt;java.lang.Object&gt;&gt; handlers</pre>
</li>
</ul>
<a id="threadHandlers">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>threadHandlers</h4>
<pre>private final&nbsp;java.lang.ThreadLocal&lt;java.util.List&lt;java.util.function.Consumer&lt;java.lang.Object&gt;&gt;&gt; threadHandlers</pre>
</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;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Hook</h4>
<pre>private&nbsp;Hook()</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="values()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre class="methodSignature">public static&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>[]&nbsp;values()</pre>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
<pre>
for (Hook c : Hook.values())
&nbsp; System.out.println(c);
</pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array containing the constants of this enum type, in the order they are declared</dd>
</dl>
</li>
</ul>
<a id="valueOf(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOf</h4>
<pre class="methodSignature">public static&nbsp;<a href="Hook.html" title="enum in org.apache.calcite.runtime">Hook</a>&nbsp;valueOf&#8203;(java.lang.String&nbsp;name)</pre>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the enum constant with the specified name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd>
<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>
</dl>
</li>
</ul>
<a id="add(java.util.function.Consumer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a>&nbsp;add&#8203;(java.util.function.Consumer&lt;T&gt;&nbsp;handler)</pre>
<div class="block">Adds a handler for this Hook.
<p>Returns a <a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime"><code>Hook.Closeable</code></a> so that you can use the following
try-finally pattern to prevent leaks:</p>
<blockquote><pre>
final Hook.Closeable closeable = Hook.FOO.add(HANDLER);
try {
...
} finally {
closeable.close();
}</pre>
</blockquote></div>
</li>
</ul>
<a id="add(java.util.function.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;&lt;T,&#8203;R&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a>&nbsp;add&#8203;(java.util.function.Function&lt;T,&#8203;R&gt;&nbsp;handler)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#add(java.util.function.Consumer)"><code>add(Consumer)</code></a>.</div>
</div>
</li>
</ul>
<a id="remove(java.util.function.Consumer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;remove&#8203;(java.util.function.Consumer&nbsp;handler)</pre>
<div class="block">Removes a handler from this Hook.</div>
</li>
</ul>
<a id="addThread(java.util.function.Consumer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addThread</h4>
<pre class="methodSignature">public&nbsp;&lt;T&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a>&nbsp;addThread&#8203;(java.util.function.Consumer&lt;T&gt;&nbsp;handler)</pre>
<div class="block">Adds a handler for this thread.</div>
</li>
</ul>
<a id="addThread(com.google.common.base.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addThread</h4>
<pre class="methodSignature">@Deprecated
public&nbsp;&lt;T,&#8203;R&gt;&nbsp;<a href="Hook.Closeable.html" title="interface in org.apache.calcite.runtime">Hook.Closeable</a>&nbsp;addThread&#8203;(com.google.common.base.Function&lt;T,&#8203;R&gt;&nbsp;handler)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#addThread(java.util.function.Consumer)"><code>addThread(Consumer)</code></a>.</div>
</div>
</li>
</ul>
<a id="removeThread(java.util.function.Consumer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeThread</h4>
<pre class="methodSignature">private&nbsp;boolean&nbsp;removeThread&#8203;(java.util.function.Consumer&nbsp;handler)</pre>
<div class="block">Removes a thread handler from this Hook.</div>
</li>
</ul>
<a id="property(java.lang.Object)">
<!-- -->
</a><a id="property(V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>property</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;&lt;V&gt;&nbsp;com.google.common.base.Function&lt;<a href="../util/Holder.html" title="class in org.apache.calcite.util">Holder</a>&lt;V&gt;,&#8203;java.lang.Void&gt;&nbsp;property&#8203;(V&nbsp;v)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#propertyJ(V)"><code>propertyJ(V)</code></a>.</div>
</div>
</li>
</ul>
<a id="propertyJ(java.lang.Object)">
<!-- -->
</a><a id="propertyJ(V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propertyJ</h4>
<pre class="methodSignature">public static&nbsp;&lt;V&gt;&nbsp;java.util.function.Consumer&lt;<a href="../util/Holder.html" title="class in org.apache.calcite.util">Holder</a>&lt;V&gt;&gt;&nbsp;propertyJ&#8203;(V&nbsp;v)</pre>
<div class="block">Returns a function that, when a hook is called, will "return" a given
value. (Because of the way hooks work, it "returns" the value by writing
into a <a href="../util/Holder.html" title="class in org.apache.calcite.util"><code>Holder</code></a>.</div>
</li>
</ul>
<a id="run(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;run&#8203;(java.lang.Object&nbsp;arg)</pre>
<div class="block">Runs all handlers registered for this Hook, with the given argument.</div>
</li>
</ul>
<a id="get(java.lang.Object)">
<!-- -->
</a><a id="get(V)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>get</h4>
<pre class="methodSignature">public&nbsp;&lt;V&gt;&nbsp;V&nbsp;get&#8203;(V&nbsp;defaultValue)</pre>
<div class="block">Returns the value of a property hook.
(Property hooks take a <a href="../util/Holder.html" title="class in org.apache.calcite.util"><code>Holder</code></a> as an argument.)</div>
</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/Hook.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="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li>
<li><a href="#field.detail">Field</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>