| <!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>ResultSetLoader (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="ResultSetLoader (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,"i19":6,"i20":6,"i21":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/ResultSetLoader.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/resultSet/ResultSetCopier.html" title="interface in org.apache.drill.exec.physical.resultSet"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultVectorCache.html" title="interface in org.apache.drill.exec.physical.resultSet"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" target="_top">Frames</a></li> |
| <li><a href="ResultSetLoader.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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.resultSet</div> |
| <h2 title="Interface ResultSetLoader" class="title">Interface ResultSetLoader</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/resultSet/impl/ResultSetLoaderImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultSetLoaderImpl</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">ResultSetLoader</span></pre> |
| <div class="block">Builds a result set (series of zero or more row sets) based on a defined |
| schema which may |
| evolve (expand) over time. Automatically rolls "overflow" rows over |
| when a batch fills. |
| <p> |
| Many of the methods in this interface verify that the loader is |
| in the proper state. For example, an exception is thrown if the caller |
| attempts to save a row before starting a batch. However, the per-column |
| write methods are checked only through assertions that should enabled |
| during testing, but will be disabled during production.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>VectorContainerWriter}, the class which this class |
| replaces</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== 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"> </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/resultSet/ResultSetLoader.html#DEFAULT_ROW_COUNT">DEFAULT_ROW_COUNT</a></span></code> </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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </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><a href="../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#activeSchema--">activeSchema</a></span>()</code> |
| <div class="block">Returns the active output schema; the schema used by the writers, |
| minus any unprojected columns.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#atLimit--">atLimit</a></span>()</code> |
| <div class="block">After a <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#harvest--"><code>harvest()</code></a>, call, call this method to determine if |
| the scan limit has been hit.</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/resultSet/ResultSetLoader.html#batchCount--">batchCount</a></span>()</code> |
| <div class="block">Total number of batches created.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#close--">close</a></span>()</code> |
| <div class="block">Called after all rows are returned, whether because no more data is |
| available, or the caller wishes to cancel the current row batch |
| and complete.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#errorContext--">errorContext</a></span>()</code> |
| <div class="block">Context for error messages.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#harvest--">harvest</a></span>()</code> |
| <div class="block">Harvest the current row batch, and reset the mutator |
| to the start of the next row batch (which may already contain |
| an overflow row.</div> |
| </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/resultSet/ResultSetLoader.html#hasRows--">hasRows</a></span>()</code> |
| <div class="block">Report whether the loader currently holds rows.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#isProjectionEmpty--">isProjectionEmpty</a></span>()</code> |
| <div class="block">Reports if this is an empty projection such as occurs in a |
| <tt>SELECT COUNT(*)</tt> query.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#maxBatchSize--">maxBatchSize</a></span>()</code> |
| <div class="block">The maximum number of rows for the present batch.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#outputContainer--">outputContainer</a></span>()</code> |
| <div class="block">Returns the output container which holds (or will hold) batches |
| from this loader.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#outputSchema--">outputSchema</a></span>()</code> |
| <div class="block">The schema of the harvested batch.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#schemaVersion--">schemaVersion</a></span>()</code> |
| <div class="block">Current schema version.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet">ResultSetLoader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#setRow-java.lang.Object...-">setRow</a></span>(<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>... values)</code> |
| <div class="block">Load a row using column values passed as variable-length arguments.</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/resultSet/ResultSetLoader.html#setTargetRowCount-int-">setTargetRowCount</a></span>(int count)</code> |
| <div class="block">Adjust the number of rows to produce in the next batch.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#skipRows-int-">skipRows</a></span>(int requestedCount)</code> |
| <div class="block">Requests to skip the given number of rows.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#startBatch--">startBatch</a></span>()</code> |
| <div class="block">Start a new row batch.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#targetRowCount--">targetRowCount</a></span>()</code> |
| <div class="block">The number of rows produced by this loader (as configured in the loader |
| options.)</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#targetVectorSize--">targetVectorSize</a></span>()</code> |
| <div class="block">The largest vector size produced by this loader (as specified by |
| the value vector limit.)</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#totalRowCount--">totalRowCount</a></span>()</code> |
| <div class="block">Total number of rows loaded for all previous batches and the |
| current batch.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultVectorCache.html" title="interface in org.apache.drill.exec.physical.resultSet">ResultVectorCache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#vectorCache--">vectorCache</a></span>()</code> |
| <div class="block">Peek at the internal vector cache for readers that need a bit of help |
| resolving types based on what was previously seen.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#writeable--">writeable</a></span>()</code> |
| <div class="block">Reports whether the loader is in a writable state.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/drill/exec/physical/resultSet/RowSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet">RowSetLoader</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#writer--">writer</a></span>()</code> |
| <div class="block">Writer for the top-level tuple (the entire row).</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="DEFAULT_ROW_COUNT"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DEFAULT_ROW_COUNT</h4> |
| <pre>static final int DEFAULT_ROW_COUNT</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.drill.exec.physical.resultSet.ResultSetLoader.DEFAULT_ROW_COUNT">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="errorContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>errorContext</h4> |
| <pre><a href="../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a> errorContext()</pre> |
| <div class="block">Context for error messages.</div> |
| </li> |
| </ul> |
| <a name="schemaVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>schemaVersion</h4> |
| <pre>int schemaVersion()</pre> |
| <div class="block">Current schema version. The version increments by one each time |
| a column is added.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current schema version</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setTargetRowCount-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setTargetRowCount</h4> |
| <pre>void setTargetRowCount(int count)</pre> |
| <div class="block">Adjust the number of rows to produce in the next batch. Takes |
| affect after the next call to <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#startBatch--"><code>startBatch()</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>count</code> - target batch row count</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="targetRowCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>targetRowCount</h4> |
| <pre>int targetRowCount()</pre> |
| <div class="block">The number of rows produced by this loader (as configured in the loader |
| options.)</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the target row count for batches that this loader produces</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxBatchSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxBatchSize</h4> |
| <pre>int maxBatchSize()</pre> |
| <div class="block">The maximum number of rows for the present batch. Will be the lesser |
| of the {@link #targetRowCount()) and the overall scan limit remaining.</div> |
| </li> |
| </ul> |
| <a name="targetVectorSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>targetVectorSize</h4> |
| <pre>int targetVectorSize()</pre> |
| <div class="block">The largest vector size produced by this loader (as specified by |
| the value vector limit.)</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the largest vector size. Attempting to extend a vector beyond |
| this limit causes automatic vector overflow and terminates the |
| in-flight batch, even if the batch has not yet reached the target |
| row count</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="batchCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>batchCount</h4> |
| <pre>int batchCount()</pre> |
| <div class="block">Total number of batches created. Includes the current batch if |
| the row count in this batch is non-zero.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of batches produced including the current |
| one</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="totalRowCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>totalRowCount</h4> |
| <pre>long totalRowCount()</pre> |
| <div class="block">Total number of rows loaded for all previous batches and the |
| current batch.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>total row count</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasRows--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasRows</h4> |
| <pre>boolean hasRows()</pre> |
| <div class="block">Report whether the loader currently holds rows. If within a batch, |
| reports if at least one row has been read (which might be a look-ahead |
| row.) If between batches, reports if a look-ahead row is available.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if at least one row is available to harvest, false |
| otherwise</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="startBatch--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>startBatch</h4> |
| <pre>boolean startBatch()</pre> |
| <div class="block">Start a new row batch. Valid only when first started, or after the |
| previous batch has been harvested.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if another batch can be read, <code>false</code> if |
| the reader has reached the given scan limit.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writer</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/physical/resultSet/RowSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet">RowSetLoader</a> writer()</pre> |
| <div class="block">Writer for the top-level tuple (the entire row). Valid only when |
| the mutator is actively writing a batch (after <tt>startBatch()</tt> |
| but before </tt>harvest()</tt>.)</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>writer for the top-level columns</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeable</h4> |
| <pre>boolean writeable()</pre> |
| <div class="block">Reports whether the loader is in a writable state. The writable state |
| occurs only when a batch has been started, and before that batch |
| becomes full.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the client can add a row to the loader, false if |
| not</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setRow-java.lang.Object...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRow</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet">ResultSetLoader</a> setRow(<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>... values)</pre> |
| <div class="block">Load a row using column values passed as variable-length arguments. Expects |
| map values to represented as an array. |
| A schema of (a:int, b:map(c:varchar)) would be> |
| set as <br><tt>loadRow(10, new Object[] {"foo"});</tt><br> |
| Values of arrays can be expressed as a Java |
| array. A schema of (a:int, b:int[]) can be set as<br> |
| <tt>loadRow(10, new int[] {100, 200});</tt><br>. |
| Primarily for testing, too slow for production code. |
| <p> |
| If the row consists of a single map or list, then the one value will be an |
| <tt>Object</tt> array, creating an ambiguity. Use <tt>writer().set(0, value);</tt> |
| in this case.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - column values in column index order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this loader</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="skipRows-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skipRows</h4> |
| <pre>int skipRows(int requestedCount)</pre> |
| <div class="block">Requests to skip the given number of rows. Returns the number of rows |
| actually skipped (which is limited by batch count.) |
| <p> |
| Used in <tt>SELECT COUNT(*)</tt> style queries when the downstream |
| operators want just record count, but no actual rows. |
| <p> |
| Also used to fill in a batch of only null values (such a filling |
| in a set of null vectors for unprojected columns.)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>requestedCount</code> - the number of rows to skip</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the actual number of rows skipped, which may be less than the |
| requested amount. If less, the client should call this method for |
| multiple batches until the requested count is reached</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isProjectionEmpty--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isProjectionEmpty</h4> |
| <pre>boolean isProjectionEmpty()</pre> |
| <div class="block">Reports if this is an empty projection such as occurs in a |
| <tt>SELECT COUNT(*)</tt> query. If the projection is empty, then |
| the downstream needs only the row count set in each batch, but no |
| actual vectors will be created. In this case, the client can do |
| the work to populate rows (the data will be discarded), or can call |
| <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#skipRows-int-"><code>skipRows(int)</code></a> to skip over the number of rows that would |
| have been read if any data had been projected. |
| <p> |
| Note that the empty schema case can also occur if the project list |
| from the <tt>SELECT</tt> clause is disjoint from the table schema. |
| For example, <tt>SELECT a, b</tt> from a table with schema |
| <tt>(c, d)</tt>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if no columns are actually projected, false if at |
| least one column is projected</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="activeSchema--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>activeSchema</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a> activeSchema()</pre> |
| <div class="block">Returns the active output schema; the schema used by the writers, |
| minus any unprojected columns. This is usually the same as the |
| output schema, but may differ if the writer adds columns during |
| an overflow row. Unlike the output schema, this schema is defined |
| as long as the loader is open.</div> |
| </li> |
| </ul> |
| <a name="outputContainer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>outputContainer</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a> outputContainer()</pre> |
| <div class="block">Returns the output container which holds (or will hold) batches |
| from this loader. For use when the container is needed prior |
| to "harvesting" a batch. The data is not valid until |
| <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#harvest--"><code>harvest()</code></a> is called, and is no longer valid once |
| <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#startBatch--"><code>startBatch()</code></a> is called.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>container used to publish results from this loader</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="harvest--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>harvest</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/record/VectorContainer.html" title="class in org.apache.drill.exec.record">VectorContainer</a> harvest()</pre> |
| <div class="block">Harvest the current row batch, and reset the mutator |
| to the start of the next row batch (which may already contain |
| an overflow row. |
| <p> |
| The schema of the returned container is defined as: |
| <ul> |
| <li>The schema as passed in via the loader options, plus</li> |
| <li>Columns added dynamically during write, minus</li> |
| <li>Any columns not included in the project list, minus</li> |
| <li>Any columns added in the overflow row.</li> |
| </ul> |
| That is, column order is as defined by the initial schema and column |
| additions. In particular, the schema order is <b>not</b> defined by |
| the projection list. (Another mechanism is required to reorder columns |
| for the actual projection.)</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the row batch to send downstream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="atLimit--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>atLimit</h4> |
| <pre>boolean atLimit()</pre> |
| <div class="block">After a <a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#harvest--"><code>harvest()</code></a>, call, call this method to determine if |
| the scan limit has been hit. If so, treat this as the final batch |
| for the reader, even if more data is available to read.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the scan has reached a set scan row limit, |
| <code>false</code> if there is no limit, or more rows can be read.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="outputSchema--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>outputSchema</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a> outputSchema()</pre> |
| <div class="block">The schema of the harvested batch. Valid until the start of the |
| next batch.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the extended schema of the harvested batch which includes |
| any allocation hints used when creating the batch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="vectorCache--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>vectorCache</h4> |
| <pre><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultVectorCache.html" title="interface in org.apache.drill.exec.physical.resultSet">ResultVectorCache</a> vectorCache()</pre> |
| <div class="block">Peek at the internal vector cache for readers that need a bit of help |
| resolving types based on what was previously seen.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>real or dummy vector cache</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="close--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>void close()</pre> |
| <div class="block">Called after all rows are returned, whether because no more data is |
| available, or the caller wishes to cancel the current row batch |
| and complete.</div> |
| </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/ResultSetLoader.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/resultSet/ResultSetCopier.html" title="interface in org.apache.drill.exec.physical.resultSet"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/drill/exec/physical/resultSet/ResultVectorCache.html" title="interface in org.apache.drill.exec.physical.resultSet"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" target="_top">Frames</a></li> |
| <li><a href="ResultSetLoader.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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 © 1970 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |