blob: 7f52cd03d7f82a0cb953a520ee7c65563d4dbfcb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HashTable (Drill : 1.20.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HashTable (Drill : 1.20.3 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashTable.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">
<li><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashPartition.html" title="class in org.apache.drill.exec.physical.impl.common"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.PutStatus.html" title="enum in org.apache.drill.exec.physical.impl.common"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/drill/exec/physical/impl/common/HashTable.html" target="_top">Frames</a></li>
<li><a href="HashTable.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.drill.exec.physical.impl.common</div>
<h2 title="Interface HashTable" class="title">Interface HashTable</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.html" title="class in org.apache.drill.exec.physical.impl.common">HashTableTemplate</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">HashTable</span></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.PutStatus.html" title="enum in org.apache.drill.exec.physical.impl.common">HashTable.PutStatus</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#BATCH_MASK">BATCH_MASK</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#BATCH_SIZE">BATCH_SIZE</a></span></code>
<div class="block">The batch size used for internal batch holders</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#DEFAULT_LOAD_FACTOR">DEFAULT_LOAD_FACTOR</a></span></code>
<div class="block">The default load factor of a hash table.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#MAXIMUM_CAPACITY">MAXIMUM_CAPACITY</a></span></code>
<div class="block">The maximum capacity of the hash table (in terms of number of buckets).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/drill/exec/compile/TemplateClassDefinition.html" title="class in org.apache.drill.exec.compile">TemplateClassDefinition</a>&lt;<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common">HashTable</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#TEMPLATE_DEFINITION">TEMPLATE_DEFINITION</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&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></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#clear--">clear</a></span>()</code>
<div class="block">Frees all the direct memory consumed by the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#getActualSize--">getActualSize</a></span>()</code>
<div class="block">The amount of direct memory consumed by the hash table.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#getBuildHashCode-int-">getBuildHashCode</a></span>(int&nbsp;incomingRowIdx)</code>
<div class="block">Computes the hash code for the record at the given index in the build side batch.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#getProbeHashCode-int-">getProbeHashCode</a></span>(int&nbsp;incomingRowIdx)</code>
<div class="block">Computes the hash code for the record at the given index in the probe side batch.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#getStats-org.apache.drill.exec.physical.impl.common.HashTableStats-">getStats</a></span>(<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableStats.html" title="class in org.apache.drill.exec.physical.impl.common">HashTableStats</a>&nbsp;stats)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#getTargetBatchRowCount--">getTargetBatchRowCount</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#isEmpty--">isEmpty</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#makeDebugString--">makeDebugString</a></span>()</code>
<div class="block">Returns a message containing memory usage statistics.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>org.apache.commons.lang3.tuple.Pair&lt;<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#nextBatch--">nextBatch</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#outputKeys-int-org.apache.drill.exec.record.VectorContainer-int-">outputKeys</a></span>(int&nbsp;batchIdx,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;outContainer,
int&nbsp;numRecords)</code>
<div class="block">Retrieves the key columns and transfers them to the output container.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#probeForKey-int-int-">probeForKey</a></span>(int&nbsp;incomingRowIdx,
int&nbsp;hashCode)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.PutStatus.html" title="enum in org.apache.drill.exec.physical.impl.common">HashTable.PutStatus</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#put-int-org.apache.drill.exec.physical.impl.common.IndexPointer-int-int-">put</a></span>(int&nbsp;incomingRowIdx,
<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/IndexPointer.html" title="class in org.apache.drill.exec.physical.impl.common">IndexPointer</a>&nbsp;htIdxHolder,
int&nbsp;hashCode,
int&nbsp;batchSize)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#reset--">reset</a></span>()</code>
<div class="block">Clears all the memory used by the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a> and re-initializes it.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#setTargetBatchRowCount-int-">setTargetBatchRowCount</a></span>(int&nbsp;batchRowCount)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#setup-org.apache.drill.exec.physical.impl.common.HashTableConfig-org.apache.drill.exec.memory.BufferAllocator-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.ops.FragmentContext-org.apache.drill.exec.expr.ClassGenerator-">setup</a></span>(<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableConfig.html" title="class in org.apache.drill.exec.physical.impl.common">HashTableConfig</a>&nbsp;htConfig,
<a href="../../../../../../../org/apache/drill/exec/memory/BufferAllocator.html" title="interface in org.apache.drill.exec.memory">BufferAllocator</a>&nbsp;allocator,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;incomingBuild,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;incomingProbe,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;outgoing,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;htContainerOrig,
<a href="../../../../../../../org/apache/drill/exec/ops/FragmentContext.html" title="interface in org.apache.drill.exec.ops">FragmentContext</a>&nbsp;context,
<a href="../../../../../../../org/apache/drill/exec/expr/ClassGenerator.html" title="class in org.apache.drill.exec.expr">ClassGenerator</a>&lt;?&gt;&nbsp;cg)</code>
<div class="block"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#setup-org.apache.drill.exec.physical.impl.common.HashTableConfig-org.apache.drill.exec.memory.BufferAllocator-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.ops.FragmentContext-org.apache.drill.exec.expr.ClassGenerator-"><code>setup(org.apache.drill.exec.physical.impl.common.HashTableConfig, org.apache.drill.exec.memory.BufferAllocator, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.ops.FragmentContext, org.apache.drill.exec.expr.ClassGenerator&lt;?&gt;)</code></a> must be called before anything can be done to the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a>.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#size--">size</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#updateBatches--">updateBatches</a></span>()</code>
<div class="block">Updates the incoming (build and probe side) value vectors references in the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a>s.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#updateIncoming-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-">updateIncoming</a></span>(<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;newIncoming,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;newIncomingProbe)</code>
<div class="block">Changes the incoming probe and build side batches, and then updates all the value vector references in the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a>s.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#updateInitialCapacity-int-">updateInitialCapacity</a></span>(int&nbsp;initialCapacity)</code>
<div class="block">Update the initial capacity for the hash table.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="TEMPLATE_DEFINITION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TEMPLATE_DEFINITION</h4>
<pre>static final&nbsp;<a href="../../../../../../../org/apache/drill/exec/compile/TemplateClassDefinition.html" title="class in org.apache.drill.exec.compile">TemplateClassDefinition</a>&lt;<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common">HashTable</a>&gt; TEMPLATE_DEFINITION</pre>
</li>
</ul>
<a name="MAXIMUM_CAPACITY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAXIMUM_CAPACITY</h4>
<pre>static final&nbsp;int MAXIMUM_CAPACITY</pre>
<div class="block">The maximum capacity of the hash table (in terms of number of buckets).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.drill.exec.physical.impl.common.HashTable.MAXIMUM_CAPACITY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_LOAD_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_LOAD_FACTOR</h4>
<pre>static final&nbsp;float DEFAULT_LOAD_FACTOR</pre>
<div class="block">The default load factor of a hash table.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.drill.exec.physical.impl.common.HashTable.DEFAULT_LOAD_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BATCH_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BATCH_SIZE</h4>
<pre>static final&nbsp;int BATCH_SIZE</pre>
<div class="block">The batch size used for internal batch holders</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.drill.exec.physical.impl.common.HashTable.BATCH_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BATCH_MASK">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BATCH_MASK</h4>
<pre>static final&nbsp;int BATCH_MASK</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.drill.exec.physical.impl.common.HashTable.BATCH_MASK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setup-org.apache.drill.exec.physical.impl.common.HashTableConfig-org.apache.drill.exec.memory.BufferAllocator-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.ops.FragmentContext-org.apache.drill.exec.expr.ClassGenerator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setup</h4>
<pre>void&nbsp;setup(<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableConfig.html" title="class in org.apache.drill.exec.physical.impl.common">HashTableConfig</a>&nbsp;htConfig,
<a href="../../../../../../../org/apache/drill/exec/memory/BufferAllocator.html" title="interface in org.apache.drill.exec.memory">BufferAllocator</a>&nbsp;allocator,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;incomingBuild,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;incomingProbe,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;outgoing,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;htContainerOrig,
<a href="../../../../../../../org/apache/drill/exec/ops/FragmentContext.html" title="interface in org.apache.drill.exec.ops">FragmentContext</a>&nbsp;context,
<a href="../../../../../../../org/apache/drill/exec/expr/ClassGenerator.html" title="class in org.apache.drill.exec.expr">ClassGenerator</a>&lt;?&gt;&nbsp;cg)</pre>
<div class="block"><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html#setup-org.apache.drill.exec.physical.impl.common.HashTableConfig-org.apache.drill.exec.memory.BufferAllocator-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.RecordBatch-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.ops.FragmentContext-org.apache.drill.exec.expr.ClassGenerator-"><code>setup(org.apache.drill.exec.physical.impl.common.HashTableConfig, org.apache.drill.exec.memory.BufferAllocator, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.RecordBatch, org.apache.drill.exec.record.VectorContainer, org.apache.drill.exec.ops.FragmentContext, org.apache.drill.exec.expr.ClassGenerator&lt;?&gt;)</code></a> must be called before anything can be done to the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>htConfig</code> - </dd>
<dd><code>allocator</code> - </dd>
<dd><code>incomingBuild</code> - </dd>
<dd><code>incomingProbe</code> - </dd>
<dd><code>outgoing</code> - </dd>
<dd><code>htContainerOrig</code> - </dd>
<dd><code>context</code> - </dd>
<dd><code>cg</code> - </dd>
</dl>
</li>
</ul>
<a name="updateBatches--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateBatches</h4>
<pre>void&nbsp;updateBatches()
throws <a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></pre>
<div class="block">Updates the incoming (build and probe side) value vectors references in the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a>s.
This is useful on OK_NEW_SCHEMA (need to verify).</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></code></dd>
</dl>
</li>
</ul>
<a name="getBuildHashCode-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBuildHashCode</h4>
<pre>int&nbsp;getBuildHashCode(int&nbsp;incomingRowIdx)
throws <a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></pre>
<div class="block">Computes the hash code for the record at the given index in the build side batch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>incomingRowIdx</code> - The index of the build side record of interest.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The hash code for the record at the given index in the build side batch.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></code></dd>
</dl>
</li>
</ul>
<a name="getProbeHashCode-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProbeHashCode</h4>
<pre>int&nbsp;getProbeHashCode(int&nbsp;incomingRowIdx)
throws <a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></pre>
<div class="block">Computes the hash code for the record at the given index in the probe side batch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>incomingRowIdx</code> - The index of the probe side record of interest.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The hash code for the record at the given index in the probe side batch.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></code></dd>
</dl>
</li>
</ul>
<a name="put-int-org.apache.drill.exec.physical.impl.common.IndexPointer-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.PutStatus.html" title="enum in org.apache.drill.exec.physical.impl.common">HashTable.PutStatus</a>&nbsp;put(int&nbsp;incomingRowIdx,
<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/IndexPointer.html" title="class in org.apache.drill.exec.physical.impl.common">IndexPointer</a>&nbsp;htIdxHolder,
int&nbsp;hashCode,
int&nbsp;batchSize)
throws <a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a>,
<a href="../../../../../../../org/apache/drill/common/exceptions/RetryAfterSpillException.html" title="class in org.apache.drill.common.exceptions">RetryAfterSpillException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></code></dd>
<dd><code><a href="../../../../../../../org/apache/drill/common/exceptions/RetryAfterSpillException.html" title="class in org.apache.drill.common.exceptions">RetryAfterSpillException</a></code></dd>
</dl>
</li>
</ul>
<a name="probeForKey-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>probeForKey</h4>
<pre>int&nbsp;probeForKey(int&nbsp;incomingRowIdx,
int&nbsp;hashCode)
throws <a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>incomingRowIdx</code> - The index of the key in the probe batch.</dd>
<dd><code>hashCode</code> - The hashCode of the key.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns -1 if the data in the probe batch at the given incomingRowIdx is not in the hash table. Otherwise returns
the composite index of the key in the hash table (index of BatchHolder and record in Batch Holder).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/drill/exec/exception/SchemaChangeException.html" title="class in org.apache.drill.exec.exception">SchemaChangeException</a></code></dd>
</dl>
</li>
</ul>
<a name="getStats-org.apache.drill.exec.physical.impl.common.HashTableStats-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStats</h4>
<pre>void&nbsp;getStats(<a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableStats.html" title="class in org.apache.drill.exec.physical.impl.common">HashTableStats</a>&nbsp;stats)</pre>
</li>
</ul>
<a name="size--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>int&nbsp;size()</pre>
</li>
</ul>
<a name="isEmpty--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>boolean&nbsp;isEmpty()</pre>
</li>
</ul>
<a name="clear--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>void&nbsp;clear()</pre>
<div class="block">Frees all the direct memory consumed by the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a>.</div>
</li>
</ul>
<a name="updateInitialCapacity-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateInitialCapacity</h4>
<pre>void&nbsp;updateInitialCapacity(int&nbsp;initialCapacity)</pre>
<div class="block">Update the initial capacity for the hash table. This method will be removed after the key vectors are removed from the hash table. It is used
to allocate <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a>s of appropriate size when the final size of the HashTable is known.
<b>Warning!</b> Only call this method before you have inserted elements into the HashTable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>initialCapacity</code> - The new initial capacity to use.</dd>
</dl>
</li>
</ul>
<a name="updateIncoming-org.apache.drill.exec.record.VectorContainer-org.apache.drill.exec.record.RecordBatch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateIncoming</h4>
<pre>void&nbsp;updateIncoming(<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;newIncoming,
<a href="../../../../../../../org/apache/drill/exec/record/RecordBatch.html" title="interface in org.apache.drill.exec.record">RecordBatch</a>&nbsp;newIncomingProbe)</pre>
<div class="block">Changes the incoming probe and build side batches, and then updates all the value vector references in the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a>s.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newIncoming</code> - The new build side batch.</dd>
<dd><code>newIncomingProbe</code> - The new probe side batch.</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()</pre>
<div class="block">Clears all the memory used by the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a> and re-initializes it.</div>
</li>
</ul>
<a name="outputKeys-int-org.apache.drill.exec.record.VectorContainer-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>outputKeys</h4>
<pre>boolean&nbsp;outputKeys(int&nbsp;batchIdx,
<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>&nbsp;outContainer,
int&nbsp;numRecords)</pre>
<div class="block">Retrieves the key columns and transfers them to the output container. Note this operation removes the key columns from the <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.html" title="interface in org.apache.drill.exec.physical.impl.common"><code>HashTable</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>batchIdx</code> - The index of a <a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTableTemplate.BatchHolder.html" title="class in org.apache.drill.exec.physical.impl.common"><code>HashTableTemplate.BatchHolder</code></a> in the HashTable.</dd>
<dd><code>outContainer</code> - The destination container for the key columns.</dd>
<dd><code>numRecords</code> - The number of key recorts to transfer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
</dl>
</li>
</ul>
<a name="makeDebugString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>makeDebugString</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;makeDebugString()</pre>
<div class="block">Returns a message containing memory usage statistics. Intended to be used for printing debugging or error messages.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A debug string.</dd>
</dl>
</li>
</ul>
<a name="getActualSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getActualSize</h4>
<pre>long&nbsp;getActualSize()</pre>
<div class="block">The amount of direct memory consumed by the hash table.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
</dl>
</li>
</ul>
<a name="setTargetBatchRowCount-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTargetBatchRowCount</h4>
<pre>void&nbsp;setTargetBatchRowCount(int&nbsp;batchRowCount)</pre>
</li>
</ul>
<a name="getTargetBatchRowCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTargetBatchRowCount</h4>
<pre>int&nbsp;getTargetBatchRowCount()</pre>
</li>
</ul>
<a name="nextBatch--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>nextBatch</h4>
<pre>org.apache.commons.lang3.tuple.Pair&lt;<a href="../../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;nextBatch()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashTable.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">
<li><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashPartition.html" title="class in org.apache.drill.exec.physical.impl.common"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/drill/exec/physical/impl/common/HashTable.PutStatus.html" title="enum in org.apache.drill.exec.physical.impl.common"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/drill/exec/physical/impl/common/HashTable.html" target="_top">Frames</a></li>
<li><a href="HashTable.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.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>
</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>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1970 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>