blob: 9884c098e53ed489087b9a46b81f568d5db59586 [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>VarBinaryVector.Mutator (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="VarBinaryVector.Mutator (Drill : 1.20.3 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/VarBinaryVector.Mutator.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/vector/VarBinaryVector.BufferedMutator.html" title="class in org.apache.drill.exec.vector"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/drill/exec/vector/VarCharVector.html" title="class in org.apache.drill.exec.vector"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/drill/exec/vector/VarBinaryVector.Mutator.html" target="_top">Frames</a></li>
<li><a href="VarBinaryVector.Mutator.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>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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.vector</div>
<h2 title="Class VarBinaryVector.Mutator" class="title">Class VarBinaryVector.Mutator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html" title="class in org.apache.drill.exec.vector">org.apache.drill.exec.vector.BaseValueVector.BaseMutator</a></li>
<li>
<ul class="inheritance">
<li>org.apache.drill.exec.vector.VarBinaryVector.Mutator</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html" title="interface in org.apache.drill.exec.vector">ValueVector.Mutator</a>, <a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.VariableWidthMutator.html" title="interface in org.apache.drill.exec.vector">VariableWidthVector.VariableWidthMutator</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.html" title="class in org.apache.drill.exec.vector">VarBinaryVector</a></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">VarBinaryVector.Mutator</span>
extends <a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html" title="class in org.apache.drill.exec.vector">BaseValueVector.BaseMutator</a>
implements <a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.VariableWidthMutator.html" title="interface in org.apache.drill.exec.vector">VariableWidthVector.VariableWidthMutator</a></pre>
<div class="block"><h4>Overview</h4>
<p>
MutableVarBinary implements a vector of variable width values. Elements in the vector
are accessed by position from the logical start of the vector. A fixed width offsetVector
is used to convert an element's position to it's offset from the start of the (0-based)
DrillBuf. Size is inferred by adjacent elements.
The width of each element is 4 byte(s)
The equivalent Java primitive is 'int'
NB: this class is automatically generated from ValueVectorTypes.tdd using FreeMarker.
</p>
<h4>Contract</h4>
<p>
<ol>
<li>
<b>Supported Writes:</b> <a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.html" title="interface in org.apache.drill.exec.vector"><code>VariableWidthVector</code></a>s do not support random writes. In contrast <a href="../../../../../org/apache/drill/exec/vector/FixedWidthVector.html" title="interface in org.apache.drill.exec.vector"><code>FixedWidthVector</code></a>s do
allow random writes but special care is needed.
</li>
<li>
<b>Writing Values:</b> All set methods must be called with a consecutive sequence of indices. With a few exceptions:
<ol>
<li>You can update the last index you just set.</li>
<li>You can reset a previous index (call it Idx), but you must assume all the data after Idx is corrupt. Also
note that the memory consumed by data that came after Idx is not released.</li>
</ol>
</li>
<li>
<b>Setting Value Count:</b> Vectors aren't explicitly aware of how many values they contain. So you must keep track of the
number of values you've written to the vector and once you are done writing to the vector you must call <a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setValueCount-int-"><code>setValueCount(int)</code></a>.
It is possible to trim the vector by setting the value count to be less than the number of values currently contained in the vector. Note the extra memory consumed in
the data buffer is not freed when this is done.
</li>
<li>
<b>Memory Allocation:</b> When setting a value at an index you must do one of the following to ensure you do not get an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang"><code>IndexOutOfBoundsException</code></a>.
<ol>
<li>
Allocate the exact amount of memory you need when using the <a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-byte:A-"><code>set(int, byte[])</code></a> methods. If you do not
manually allocate sufficient memory an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang"><code>IndexOutOfBoundsException</code></a> can be thrown when the data buffer runs out of space.
</li>
<li>
Or you can use the <a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-byte:A-"><code>setSafe(int, byte[])</code></a> methods, which will automatically grow your data buffer to
fit your data.
</li>
</ol>
</li>
<li>
<b>Immutability:</b> Once a vector has been populated with data and <a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setValueCount-int-"><code>setValueCount(int)</code></a> has been called, it should be considered immutable.
</li>
</ol>
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#Mutator--">Mutator</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="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="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/vector/VarBinaryVector.Mutator.html#fillEmpties-int-int-">fillEmpties</a></span>(int&nbsp;lastWrite,
int&nbsp;index)</code>
<div class="block">Backfill missing offsets from the given last written position up to, but
not including the given current write position.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#generateTestData-int-">generateTestData</a></span>(int&nbsp;size)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-byte:A-">set</a></span>(int&nbsp;index,
byte[]&nbsp;bytes)</code>
<div class="block">Set the variable length element at the specified index to the supplied byte array.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-byte:A-int-int-">set</a></span>(int&nbsp;index,
byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</code>
<div class="block">Set the variable length element at the specified index to the supplied byte array.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-int-int-io.netty.buffer.DrillBuf-">set</a></span>(int&nbsp;index,
int&nbsp;start,
int&nbsp;length,
<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a>&nbsp;buffer)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-org.apache.drill.exec.expr.holders.NullableVarBinaryHolder-">set</a></span>(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/NullableVarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">NullableVarBinaryHolder</a>&nbsp;holder)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#set-int-org.apache.drill.exec.expr.holders.VarBinaryHolder-">set</a></span>(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/VarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">VarBinaryHolder</a>&nbsp;holder)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-byte:A-">setSafe</a></span>(int&nbsp;index,
byte[]&nbsp;bytes)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-byte:A-int-int-">setSafe</a></span>(int&nbsp;index,
byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-java.nio.ByteBuffer-int-int-">setSafe</a></span>(int&nbsp;index,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-int-int-io.netty.buffer.DrillBuf-">setSafe</a></span>(int&nbsp;index,
int&nbsp;start,
int&nbsp;end,
<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a>&nbsp;buffer)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-int-org.apache.drill.exec.expr.holders.NullableVarBinaryHolder-">setSafe</a></span>(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/NullableVarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">NullableVarBinaryHolder</a>&nbsp;holder)</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/vector/VarBinaryVector.Mutator.html#setSafe-int-org.apache.drill.exec.expr.holders.VarBinaryHolder-">setSafe</a></span>(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/VarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">VarBinaryHolder</a>&nbsp;holder)</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../../org/apache/drill/exec/vector/VarLenBulkEntry.html" title="interface in org.apache.drill.exec.vector">VarLenBulkEntry</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-org.apache.drill.exec.vector.VarLenBulkInput-">setSafe</a></span>(<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput</a>&lt;T&gt;&nbsp;input)</code>
<div class="block">Copies the bulk input into this value vector and extends its capacity if necessary.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../../org/apache/drill/exec/vector/VarLenBulkEntry.html" title="interface in org.apache.drill.exec.vector">VarLenBulkEntry</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setSafe-org.apache.drill.exec.vector.VarLenBulkInput-org.apache.drill.exec.vector.VarLenBulkInput.BulkInputCallback-">setSafe</a></span>(<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput</a>&lt;T&gt;&nbsp;input,
<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.BulkInputCallback.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput.BulkInputCallback</a>&lt;T&gt;&nbsp;callback)</code>
<div class="block">Copies the bulk input into this value vector and extends its capacity if necessary.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/vector/VarBinaryVector.Mutator.html#setValueCount-int-">setValueCount</a></span>(int&nbsp;valueCount)</code>
<div class="block">Notes on Usage</div>
</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/vector/VarBinaryVector.Mutator.html#setValueLengthSafe-int-int-">setValueLengthSafe</a></span>(int&nbsp;index,
int&nbsp;length)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.drill.exec.vector.BaseValueVector.BaseMutator">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.drill.exec.vector.<a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html" title="class in org.apache.drill.exec.vector">BaseValueVector.BaseMutator</a></h3>
<code><a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html#exchange-org.apache.drill.exec.vector.ValueVector.Mutator-">exchange</a>, <a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html#reset--">reset</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.drill.exec.vector.ValueVector.Mutator">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.drill.exec.vector.<a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html" title="interface in org.apache.drill.exec.vector">ValueVector.Mutator</a></h3>
<code><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html#exchange-org.apache.drill.exec.vector.ValueVector.Mutator-">exchange</a>, <a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html#reset--">reset</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Mutator--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Mutator</h4>
<pre>public&nbsp;Mutator()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="set-int-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>protected&nbsp;void&nbsp;set(int&nbsp;index,
byte[]&nbsp;bytes)</pre>
<div class="block">Set the variable length element at the specified index to the supplied byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - position of the bit to set</dd>
<dd><code>bytes</code> - array of bytes to write</dd>
</dl>
</li>
</ul>
<a name="setSafe-int-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
byte[]&nbsp;bytes)</pre>
</li>
</ul>
<a name="setSafe-org.apache.drill.exec.vector.VarLenBulkInput-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../../org/apache/drill/exec/vector/VarLenBulkEntry.html" title="interface in org.apache.drill.exec.vector">VarLenBulkEntry</a>&gt;&nbsp;void&nbsp;setSafe(<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput</a>&lt;T&gt;&nbsp;input)</pre>
<div class="block">Copies the bulk input into this value vector and extends its capacity if necessary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - bulk input</dd>
</dl>
</li>
</ul>
<a name="setSafe-org.apache.drill.exec.vector.VarLenBulkInput-org.apache.drill.exec.vector.VarLenBulkInput.BulkInputCallback-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../../org/apache/drill/exec/vector/VarLenBulkEntry.html" title="interface in org.apache.drill.exec.vector">VarLenBulkEntry</a>&gt;&nbsp;void&nbsp;setSafe(<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput</a>&lt;T&gt;&nbsp;input,
<a href="../../../../../org/apache/drill/exec/vector/VarLenBulkInput.BulkInputCallback.html" title="interface in org.apache.drill.exec.vector">VarLenBulkInput.BulkInputCallback</a>&lt;T&gt;&nbsp;callback)</pre>
<div class="block">Copies the bulk input into this value vector and extends its capacity if necessary. The callback
mechanism allows decoration as caller is invoked for each bulk entry.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - bulk input</dd>
<dd><code>callback</code> - a bulk input callback object (optional)</dd>
</dl>
</li>
</ul>
<a name="set-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>protected&nbsp;void&nbsp;set(int&nbsp;index,
byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</pre>
<div class="block">Set the variable length element at the specified index to the supplied byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - position of the bit to set</dd>
<dd><code>bytes</code> - array of bytes to write</dd>
<dd><code>start</code> - start index of bytes to write</dd>
<dd><code>length</code> - length of bytes to write</dd>
</dl>
</li>
</ul>
<a name="setSafe-int-java.nio.ByteBuffer-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</pre>
</li>
</ul>
<a name="setSafe-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;length)</pre>
</li>
</ul>
<a name="setValueLengthSafe-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValueLengthSafe</h4>
<pre>public&nbsp;void&nbsp;setValueLengthSafe(int&nbsp;index,
int&nbsp;length)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.VariableWidthMutator.html#setValueLengthSafe-int-int-">setValueLengthSafe</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.VariableWidthMutator.html" title="interface in org.apache.drill.exec.vector">VariableWidthVector.VariableWidthMutator</a></code></dd>
</dl>
</li>
</ul>
<a name="setSafe-int-int-int-io.netty.buffer.DrillBuf-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
int&nbsp;start,
int&nbsp;end,
<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a>&nbsp;buffer)</pre>
</li>
</ul>
<a name="setSafe-int-org.apache.drill.exec.expr.holders.NullableVarBinaryHolder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/NullableVarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">NullableVarBinaryHolder</a>&nbsp;holder)</pre>
</li>
</ul>
<a name="setSafe-int-org.apache.drill.exec.expr.holders.VarBinaryHolder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafe</h4>
<pre>public&nbsp;void&nbsp;setSafe(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/VarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">VarBinaryHolder</a>&nbsp;holder)</pre>
</li>
</ul>
<a name="fillEmpties-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fillEmpties</h4>
<pre>public&nbsp;void&nbsp;fillEmpties(int&nbsp;lastWrite,
int&nbsp;index)</pre>
<div class="block">Backfill missing offsets from the given last written position up to, but
not including the given current write position. Used by nullable
vectors to allow skipping values. The <tt>set()</tt> and
<tt>setSafe()</tt> <b>do not</b> fill empties. See DRILL-5529.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lastWrite</code> - the position of the last valid write: the offset to be copied
forward</dd>
<dd><code>index</code> - the current write position filling occurs up to, but not
including, this position</dd>
</dl>
</li>
</ul>
<a name="set-int-int-int-io.netty.buffer.DrillBuf-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>protected&nbsp;void&nbsp;set(int&nbsp;index,
int&nbsp;start,
int&nbsp;length,
<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a>&nbsp;buffer)</pre>
</li>
</ul>
<a name="set-int-org.apache.drill.exec.expr.holders.NullableVarBinaryHolder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>protected&nbsp;void&nbsp;set(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/NullableVarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">NullableVarBinaryHolder</a>&nbsp;holder)</pre>
</li>
</ul>
<a name="set-int-org.apache.drill.exec.expr.holders.VarBinaryHolder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>protected&nbsp;void&nbsp;set(int&nbsp;index,
<a href="../../../../../org/apache/drill/exec/expr/holders/VarBinaryHolder.html" title="class in org.apache.drill.exec.expr.holders">VarBinaryHolder</a>&nbsp;holder)</pre>
</li>
</ul>
<a name="setValueCount-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValueCount</h4>
<pre>public&nbsp;void&nbsp;setValueCount(int&nbsp;valueCount)</pre>
<div class="block"><h4>Notes on Usage</h4>
<p>
For <a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.html" title="interface in org.apache.drill.exec.vector"><code>VariableWidthVector</code></a>s this method can be used in the following
cases:
<ul>
<li>Setting the actual number of elements currently contained in the
vector.</li>
<li>Trimming the vector to have fewer elements than it current does.</li>
</ul>
</p>
<h4>Caveats</h4>
<p>
It is important to note that for
<a href="../../../../../org/apache/drill/exec/vector/FixedWidthVector.html" title="interface in org.apache.drill.exec.vector"><code>FixedWidthVector</code></a>s this method can
also be used to expand the vector. However, <a href="../../../../../org/apache/drill/exec/vector/VariableWidthVector.html" title="interface in org.apache.drill.exec.vector"><code>VariableWidthVector</code></a>
do not support this usage and this method will throw an
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang"><code>IndexOutOfBoundsException</code></a> if you attempt to use it in this way.
Expansion of valueCounts is not supported mainly because there is no
benefit, since you would still have to rely on the setSafe methods to
appropriately expand the data buffer and populate the vector anyway
(since by definition we do not know the width of elements). See
DRILL-6234 for details.
</p>
<h4>Method Documentation</h4> Sets the number of values that is stored in this vector to the given value count. <b>WARNING!</b> Once the
valueCount is set, the vector should be considered immutable.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html#setValueCount-int-">setValueCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html" title="interface in org.apache.drill.exec.vector">ValueVector.Mutator</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>valueCount</code> - value count to set.</dd>
</dl>
</li>
</ul>
<a name="generateTestData-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>generateTestData</h4>
<pre>public&nbsp;void&nbsp;generateTestData(int&nbsp;size)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html#generateTestData-int-">generateTestData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/drill/exec/vector/ValueVector.Mutator.html" title="interface in org.apache.drill.exec.vector">ValueVector.Mutator</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html#generateTestData-int-">generateTestData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/drill/exec/vector/BaseValueVector.BaseMutator.html" title="class in org.apache.drill.exec.vector">BaseValueVector.BaseMutator</a></code></dd>
</dl>
</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/VarBinaryVector.Mutator.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/vector/VarBinaryVector.BufferedMutator.html" title="class in org.apache.drill.exec.vector"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/drill/exec/vector/VarCharVector.html" title="class in org.apache.drill.exec.vector"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/drill/exec/vector/VarBinaryVector.Mutator.html" target="_top">Frames</a></li>
<li><a href="VarBinaryVector.Mutator.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>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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>