| <!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>org.apache.drill.exec.physical.resultSet.impl (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="org.apache.drill.exec.physical.resultSet.impl (Drill : 1.20.3 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/model/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/drill/exec/physical/resultSet/impl/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <h1 title="Package" class="title">Package org.apache.drill.exec.physical.resultSet.impl</h1> |
| <div class="docSummary"> |
| <div class="block">Handles the details of the result set loader implementation.</div> |
| </div> |
| <p>See: <a href="#package.description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> |
| <caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Interface</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.html" title="interface in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Provides a variety of ways to filter columns: no filtering, filter |
| by (parsed) projection list, or filter by projection list and |
| provided schema.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PullResultSetReaderImpl.UpstreamSource.html" title="interface in org.apache.drill.exec.physical.resultSet.impl">PullResultSetReaderImpl.UpstreamSource</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PushResultSetReaderImpl.UpstreamSource.html" title="interface in org.apache.drill.exec.physical.resultSet.impl">PushResultSetReaderImpl.UpstreamSource</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/VectorState.html" title="interface in org.apache.drill.exec.physical.resultSet.impl">VectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Handles batch and overflow operation for a (possibly compound) vector.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> |
| <caption><span>Class Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/BuildFromSchema.html" title="class in org.apache.drill.exec.physical.resultSet.impl">BuildFromSchema</a></td> |
| <td class="colLast"> |
| <div class="block">Build the set of writers from a defined schema.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ColumnBuilder.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ColumnBuilder</a></td> |
| <td class="colLast"> |
| <div class="block">Algorithms for building a column given a metadata description of the column and |
| the parent context that will hold the column.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ColumnState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents the write-time state for a column including the writer and the (optional) |
| backing vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ColumnState.BaseContainerColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ColumnState.BaseContainerColumnState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ColumnState.PrimitiveColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ColumnState.PrimitiveColumnState</a></td> |
| <td class="colLast"> |
| <div class="block">Primitive (non-map) column state.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ContainerState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ContainerState</a></td> |
| <td class="colLast"> |
| <div class="block">Abstract representation of a container of vectors: a row, a map, a |
| repeated map, a list or a union.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ListState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ListState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents the contents of a list vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ListState.ListVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ListState.ListVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Wrapper around the list vector (and its optional contained union).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/NullableVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">NullableVectorState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/NullResultVectorCacheImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">NullResultVectorCacheImpl</a></td> |
| <td class="colLast"> |
| <div class="block">A vector cache implementation which does not actually cache.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/NullVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">NullVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Do-nothing vector state for a map column which has no actual vector |
| associated with it.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/NullVectorState.UnmanagedVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">NullVectorState.UnmanagedVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Near-do-nothing state for a vector that requires no work to |
| allocate or roll-over, but where we do want to at least track |
| the vector itself.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.BaseSchemaProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.BaseSchemaProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Schema-based projection.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.CompoundProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.CompoundProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Compound filter for combining direct and provided schema projections.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.DirectProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.DirectProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Projection filter based on the (parsed) projection list.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.ImplicitProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.ImplicitProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Implied projection: either project all or project none.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.ProjResult.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.ProjResult</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.SchemaProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.SchemaProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Projection filter in which a schema exactly defines the set of allowed |
| columns, and their types.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ProjectionFilter.TypeProjectionFilter.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ProjectionFilter.TypeProjectionFilter</a></td> |
| <td class="colLast"> |
| <div class="block">Projection based on a non-strict provided schema which enforces the type of known |
| columns, but has no opinion about additional columns.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PullResultSetReaderImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">PullResultSetReaderImpl</a></td> |
| <td class="colLast"> |
| <div class="block">Protocol</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PushResultSetReaderImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">PushResultSetReaderImpl</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PushResultSetReaderImpl.BatchHolder.html" title="class in org.apache.drill.exec.physical.resultSet.impl">PushResultSetReaderImpl.BatchHolder</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/RepeatedListState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">RepeatedListState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents the internal state of a RepeatedList vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/RepeatedListState.RepeatedListColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">RepeatedListState.RepeatedListColumnState</a></td> |
| <td class="colLast"> |
| <div class="block">Repeated list column state.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/RepeatedListState.RepeatedListVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">RepeatedListState.RepeatedListVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Track the repeated list vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/RepeatedVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">RepeatedVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Vector state for a scalar array (repeated scalar) vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ResultSetCopierImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultSetCopierImpl</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ResultSetLoaderImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultSetLoaderImpl</a></td> |
| <td class="colLast"> |
| <div class="block">Implementation of the result set loader.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ResultSetLoaderImpl.ResultSetOptions.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultSetLoaderImpl.ResultSetOptions</a></td> |
| <td class="colLast"> |
| <div class="block">Read-only set of options for the result set loader.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ResultSetOptionBuilder.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultSetOptionBuilder</a></td> |
| <td class="colLast"> |
| <div class="block">Builder for the options for the row set loader.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ResultVectorCacheImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">ResultVectorCacheImpl</a></td> |
| <td class="colLast"> |
| <div class="block">Manages an inventory of value vectors used across row batch readers.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/RowSetLoaderImpl.html" title="class in org.apache.drill.exec.physical.resultSet.impl">RowSetLoaderImpl</a></td> |
| <td class="colLast"> |
| <div class="block">Implementation of the row set loader.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Base class for a single vector.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.FixedWidthVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState.FixedWidthVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">State for a scalar value vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.IsSetVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState.IsSetVectorState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.OffsetVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState.OffsetVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Special case for an offset vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.SimpleVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState.SimpleVectorState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/SingleVectorState.VariableWidthVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">SingleVectorState.VariableWidthVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">State for a scalar value vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents the loader state for a tuple: a row or a map.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.DictArrayState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.DictArrayState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.DictArrayVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.DictArrayVectorState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.DictColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.DictColumnState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.DictState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.DictState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.DictVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.DictVectorState</a><T extends <a href="../../../../../../../org/apache/drill/exec/vector/ValueVector.html" title="interface in org.apache.drill.exec.vector">ValueVector</a>></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.MapArrayState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.MapArrayState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.MapColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.MapColumnState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents a map column (either single or repeated).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.MapState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.MapState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents a tuple defined as a Drill map: single or repeated.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.MapVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.MapVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">State for a map vector.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.RowState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.RowState</a></td> |
| <td class="colLast"> |
| <div class="block">Handles the details of the top-level tuple, the data row itself.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.SingleDictState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.SingleDictState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.SingleDictVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.SingleDictVectorState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/TupleState.SingleMapState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">TupleState.SingleMapState</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/UnionState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">UnionState</a></td> |
| <td class="colLast"> |
| <div class="block">Represents the contents of a union vector (or a pseudo-union for lists).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/UnionState.UnionColumnState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">UnionState.UnionColumnState</a></td> |
| <td class="colLast"> |
| <div class="block">Union or list (repeated union) column state.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/UnionState.UnionVectorState.html" title="class in org.apache.drill.exec.physical.resultSet.impl">UnionState.UnionVectorState</a></td> |
| <td class="colLast"> |
| <div class="block">Vector wrapper for a union vector.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> |
| <caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Enum</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/ColumnState.State.html" title="enum in org.apache.drill.exec.physical.resultSet.impl">ColumnState.State</a></td> |
| <td class="colLast"> |
| <div class="block">Columns move through various lifecycle states as identified by this |
| enum.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/impl/PullResultSetReaderImpl.State.html" title="enum in org.apache.drill.exec.physical.resultSet.impl">PullResultSetReaderImpl.State</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| <a name="package.description"> |
| <!-- --> |
| </a> |
| <h2 title="Package org.apache.drill.exec.physical.resultSet.impl Description">Package org.apache.drill.exec.physical.resultSet.impl Description</h2> |
| <div class="block">Handles the details of the result set loader implementation. |
| <p> |
| The primary purpose of this loader, and the most complex to understand and |
| maintain, is overflow handling. |
| |
| <h4>Detailed Use Cases</h4> |
| |
| Let's examine it by considering a number of |
| use cases. |
| <table style="border: 1px solid; border-collapse: collapse;"> |
| <tr><th>Row</th><th>a</th><th>b</th><th>c</th><th>d</th><th>e</th><th>f</th><th>g</th><th>h</th></tr> |
| <tr><td>n-2</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>-</td><td>-</td></tr> |
| <tr><td>n-1</td><td>X</td><td>X</td><td>X</td><td>X</td><td> </td><td> </td><td>-</td><td>-</td></tr> |
| <tr><td>n </td><td>X</td><td>!</td><td>O</td><td> </td><td>O</td><td> </td><td>O</td><td> </td></tr> |
| </table> |
| Here: |
| <ul> |
| <li>n-2, n-1, and n are rows. n is the overflow row.</li> |
| <li>X indicates a value was written before overflow.</li> |
| <li>Blank indicates no value was written in that row.</li> |
| <li>! indicates the value that triggered overflow.</li> |
| <li>- indicates a column that did not exist prior to overflow.</li> |
| <li>O indicates a value written after overflow.</li> |
| </ul> |
| Column a is written before overflow occurs, b causes overflow, and all other |
| columns either are not written, or written after overflow. |
| <p> |
| The scenarios, identified by column names above, are: |
| <dl> |
| <dt>a</dt> |
| <dd>a contains values for all three rows. |
| <ul> |
| <li>Two values were written in the "main" batch, while a third was written to |
| what becomes the overflow row.</li> |
| <li>When overflow occurs, the last write position is at n. It must be moved |
| back to n-1.</li> |
| <li>Since data was written to the overflow row, it is copied to the look- |
| ahead batch.</li> |
| <li>The last write position in the lookahead batch is 0 (since data was |
| copied into the 0th row.</li> |
| <li>When harvesting, no empty-filling is needed. Values in the main |
| batch are zero-filled when the batch is finished, values in the look-ahead |
| batch are back-filled when the first value is written.</li> |
| <li>When starting the next batch, the last write position must be set to 0 to |
| reflect the presence of the value for row n.</li> |
| </ul> |
| </dd> |
| <dt>b</dt> |
| <dd>b contains values for all three rows. The value for row n triggers |
| overflow. |
| <ul> |
| <li>The last write position is at n-1, which is kept for the "main" |
| vector.</li> |
| <li>A new overflow vector is created and starts empty, with the last write |
| position at -1.</li> |
| <li>Once created, b is immediately written to the overflow vector, advancing |
| the last write position to 0.</li> |
| <li>Harvesting, and starting the next for column b works the same as column |
| a.</li> |
| </ul> |
| </dd> |
| <dt>c</dt> |
| <dd>Column c has values for all rows. |
| <ul> |
| <li>The value for row n is written after overflow.</li> |
| <li>At overflow, the last write position is at n-1.</li> |
| <li>At overflow, a new lookahead vector is created with the last write |
| position at -1.</li> |
| <li>The value of c is written to the lookahead vector, advancing the last |
| write position to -1.</li> |
| <li>Harvesting, and starting the next for column c works the same as column |
| a.</li> |
| </ul> |
| </dd> |
| <dt>d</dt> |
| <dd>Column d writes values to the last two rows before overflow, but not to |
| the overflow row. |
| <ul> |
| <li>The last write position for the main batch is at n-1.</li> |
| <li>The last write position in the lookahead batch remains at -1.</li> |
| <li>Harvesting for column d requires filling an empty value for row n-1.</li> |
| <li>When starting the next batch, the last write position must be set to -1, |
| indicating no data yet written.</li> |
| </ul> |
| </dd> |
| <dt>f</dt> |
| <dd>Column f has no data in the last position of the main batch, and no data |
| in the overflow row. |
| <ul> |
| <li>The last write position is at n-2.</li> |
| <li>An empty value must be written into position n-1 during harvest.</li> |
| <li>On start of the next batch, the last write position starts at -1.</li> |
| </ul> |
| </dd> |
| <dt>g</dt> |
| <dd>Column g is added after overflow, and has a value written to the overflow |
| row. |
| <ul> |
| <li>On harvest, column g is simply skipped.</li> |
| <li>On start of the next row, the last write position can be left unchanged |
| since no "exchange" was done.</li> |
| </ul> |
| </dd> |
| <dt>h</dt> |
| <dd>Column h is added after overflow, but does not have data written to it |
| during the overflow row. Similar to column g, but the last write position |
| starts at -1 for the next batch.</dd> |
| </dl> |
| |
| <h4>General Rules</h4> |
| |
| The above can be summarized into a smaller set of rules: |
| <p> |
| At the time of overflow on row n: |
| <ul> |
| <li>Create or clear the lookahead vector.</li> |
| <li>Copy (last write position - n + 1) values from row n in the old vector to 0 |
| in the new one. If the copy count is negative, copy nothing. (A negative |
| copy count means that the last write position is behind the current |
| row position. Should not occur after back-filling.)</li> |
| <li>Save the last write position from the old vector, clamped at n. |
| (That is, if the last write position is before n, keep it. If at |
| n+1, set it back to n.)</li> |
| <li>Set the last write position of the overflow vector to (original last |
| write position - n), clamped at -1. That is, if the original last write |
| position was before n, the new one is -1. If the original last write |
| position is after n, shift it down by n places.</li> |
| <li>Swap buffers from the main vectors and the overflow vectors. This sets |
| aside the main values, and allows writing to continue using the overflow |
| buffers.</li> |
| </ul> |
| <p> |
| As the overflow write proceeds: |
| <ul> |
| <li>For existing columns, write as normal. The last write position moves from |
| -1 to 0.</li> |
| <li>Columns not written leave the last write position at -1.</li> |
| <li>If a new column appears, set its last write position to -1. If it is then |
| written, proceed as in the first point above.</li> |
| </ul> |
| <p> |
| At harvest time: |
| <ul> |
| <li>For every writer, save the last write position.</li> |
| <li>Swap the overflow and main buffers to put the main batch back into the |
| main vectors.</li> |
| <li>Reset the last write position for all writers to the values saved at |
| overflow time above.</li> |
| <li>Finish the batch for the main vectors as normal. No special handling |
| needed.</li> |
| </ul> |
| <p> |
| When starting the next batch: |
| <ul> |
| <li>Swap buffers again, putting the overflow row back into the main vectors. |
| (At this point, the harvested vectors should all have zero buffers.)</li> |
| <li>Restore the last write position saved during harvest.</li> |
| </ul> |
| <h4>Constraints</h4> |
| A number of constraints are worth pointing out: |
| <ul> |
| <li>Writers are bound to vectors, so we can't easily swap vectors during |
| overflow.</li> |
| <li>The project operator to which this operator feeds data also binds to |
| vectors, so the same set of vectors must be presented on every batch.</li> |
| <li>The client binds to writers, so we cannot swap writers between main and |
| overflow batches.</li> |
| <li>Therefore, the unit of swapping is the buffer that backs the vectors. |
| </li> |
| <li>Swapping is not copying; it is only exchanging pointers.</li> |
| <li>The only copying in this entire process occurs when moving previously- |
| written values in the overflow row to the new vector at the time of |
| overflow.</li> |
| </ul> |
| |
| <h4>Arrays</h4> |
| |
| The above covers the case of scalar, top-level columns. The extension to |
| scalar maps is straightforward: at run time, the members of maps are just |
| simple scalar vectors that reside in a map name space, but the structure |
| of map fields is the same as for top-level fields. (Think of map fields |
| as being "flattened" into the top-level tuple.) |
| <p> |
| Arrays are a different matter: each row can have many values associated |
| with it. Consider an array of scalars. We have: |
| <pre><code> |
| Row 0 Row 1 Row 2 |
| 0 1 2 3 4 5 6 7 8 |
| [ [a b c] [d e f] | [g h i] ] |
| </code></pre> |
| Here, the letters indicate values. The brackets show the overall vector |
| (outer brackets) and individual rows (inner brackets). The vertical line |
| shows where overflow occurred. The same rules as discussed earier still |
| apply, but we must consider both the row indexes and the array indexes. |
| <ul> |
| <li>Overflow occurs at the row level. Here row 2 overflowed and must |
| be moved to the look-ahead vector.</li> |
| <li>Value movement occurs at the value level. Here, values 6, 7 and 8 |
| must be move to the look-ahead vector.</li> |
| </ul> |
| The result, after overflow, is: |
| <pre><code> |
| Row 0 Row 1 Row 0 |
| 0 1 2 3 4 5 0 1 2 |
| [ [a b c] [d e f] ] [ [g h i] ] |
| </code></pre> |
| Further, we must consider lists: a column may consist of a list of |
| arrays. Or, a column may consist of an array of maps, one of which is |
| a list of arrays. So, the above reasoning must apply recursively down |
| the value tree. |
| <p> |
| As it turns out, there is a simple recursive algorithm, which is a |
| simple extension of the reasoning for the top-level scalar case, that can |
| handle arrays: |
| <ul> |
| <li>Start with the row index of the overflow row.</li> |
| <li>If column c, say, is an array, obtain the index of the first value for |
| the overflow row.</li> |
| <li>If c is a list, or a repeated map, then repeat the above, for each |
| member of c (a single column for a list, a set of columns for a map), but |
| replace the row index with the index of the first element.</li> |
| </ul> |
| The result will be a walk of the value tree in which the overflow index |
| starts as an index relative to the result set (a row index), and is |
| recursively replaced with an array offset for each level of the array. |
| |
| <h4>Resynching Writers after Overflow</h4> |
| |
| When an overflow occurs, our focus is starts with the single top-level row |
| that will not fit into the current batch. We move this row to the look-ahead |
| vectors. Doing so is quite simple when each row is a simple tuple. As |
| described above, the work is quite a bit more complex when the structure |
| is a JSON-like tree flattened into vectors. |
| <p> |
| Consider the writers. Each writer corresponds to a single vector. Writers |
| are grouped into logical tree nodes. Those in the root node write to |
| (single, scalar) columns that are either top-level columns, or nested |
| some level down in single-value (not array) tuples. Another tree level |
| occurs in an array: the elements of the array use a different |
| (faster-changing) index than the top (row-level) writers. Different arrays |
| have different indexes: a row may have, say, four elements in array A, |
| but 20 elements in array B. |
| <p> |
| Further, arrays can be singular (a repeated int, say) or for an entire |
| tuple (a repeated map.) And, since Drill supports the full JSON model, in |
| the most general case, there is a tree of array indexes that can be nested |
| to an arbitrary level. (A row can have an array of maps which contains a |
| column that is, itself, a list of repeated maps, a field of which is an |
| array of ints.) |
| <p> |
| Writers handle this index tree via a tree of <code>ColumnWriterIndex</code> |
| objects, often specialized for various tasks. |
| <p> |
| Now we can get to the key concept in this section: how we update those indexes |
| after an overflow. The top-level index reverts to zero. (We start writing |
| the 0th row in the new look-ahead batch.) But, nested indexes (those for arrays) |
| will start at some other position depending on the number elements already |
| written in an overflow row. The number of such elements is determined by a |
| top-down traversal of the tree (to determine the start offset of each array |
| for the row.) Resetting the writer indexes is a bottom-up process: based on |
| the number of elements in that array, the writer index is reset to match. |
| <p> |
| This flow is the opposite of the "normal" case in which a new batch is started |
| top-down, with each index being reset to zero. |
| |
| <h4>The Need for a Uniform Structure</h4> |
| |
| Drill has vastly different implementations and interfaces for: |
| <ul> |
| <li>Result sets (as a <code>VectorContainer</code>),</li> |
| <li>Arrays (as a generated repeated vector),</li> |
| <li>Lists (as a <code>ListVector</code>),</li> |
| <li>Repeated lists (as a <code>vector</code>, and</li> |
| <li>Repeated maps (<code>RepeatedMapVector</code>.</li> |
| </ul> |
| If we were to work directly with the above abstractions the code would be |
| vastly complex. Instead, we abstract out the common structure into the |
| <code>TupleMode</code> abstraction. In particular, we use the |
| single tuple model which works with a single batch. This model provides a |
| simple, uniform interface to work with columns and tuples (rows, maps), |
| and a simple way to work with arrays. This interface reduces the above |
| array algorithm to a simple set of recursive method calls.</div> |
| </div> |
| <!-- ======= 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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../../../org/apache/drill/exec/physical/resultSet/model/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/drill/exec/physical/resultSet/impl/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| <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> |