blob: c0ecdf129b926e3efa6e4302d5eac47324ec9f1a [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>SchemaNegotiator (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="SchemaNegotiator (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};
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/SchemaNegotiator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/ScanLifecycleBuilder.SchemaValidator.html" title="interface in org.apache.drill.exec.physical.impl.scan.v3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html" target="_top">Frames</a></li>
<li><a href="SchemaNegotiator.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>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.drill.exec.physical.impl.scan.v3</div>
<h2 title="Interface SchemaNegotiator" class="title">Interface SchemaNegotiator</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/file/FileSchemaNegotiator.html" title="interface in org.apache.drill.exec.physical.impl.scan.v3.file">FileSchemaNegotiator</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/file/FileSchemaNegotiatorImpl.html" title="class in org.apache.drill.exec.physical.impl.scan.v3.file">FileSchemaNegotiatorImpl</a>, <a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/lifecycle/SchemaNegotiatorImpl.html" title="class in org.apache.drill.exec.physical.impl.scan.v3.lifecycle">SchemaNegotiatorImpl</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">SchemaNegotiator</span></pre>
<div class="block">Negotiates the table schema with the scanner framework and provides
context information for the reader. Scans use either a "dynamic" or
a defined schema.
<p>
Regardless of the schema type, the result of building the schema is a
result set loader used to prepare batches for use in the query. The reader
can simply read all columns, allowing the framework to discard unwanted
values. Or for efficiency, the reader can check the column metadata to
determine if a column is projected, and if not, then don't even read
the column from the input source.
<h4>Defined Schema</h4>
If defined, the execution plan provides the output schema (presumably
computed from an accurate metadata source.) The reader must populate
the proscribed rows, performing column type conversions as needed.
The reader can determine if the schema is defined by calling
<code>hasOutputSchema()</code>.
<p>
At present, the scan framework filters the "provided schema" against
the project list so that this class presents only the actual output
schema. Future versions may do the filtering in the planner, but
the result for readers will be the same either way.
<h4>Dynamic Schema</h4>
A dynamic schema occurs when the plan does not specify a schema.
Drill is unique in its support for "schema on read" in the sense
that Drill does not know the schema until the reader defines it at
scan time.
<p>
The reader and scan framework coordinate to form the output schema.
The reader offers the columns it has available. The scan framework
uses the projection list to decide which to accept. Either way the
scan framework provides a column reader for the column (returning a
do-nothing "dummy" reader if the column is unprojected.)
<p>
With a dynamic schema, readers offer a schema in one of two ways:
<p>
The reader provides the table schema in one of two ways: early schema
or late schema. Either way, the project list from the physical plan
determines which
table columns are materialized and which are not. Readers are provided
for all table columns for readers that must read sequentially, but
only the materialized columns are written to value vectors.
<h4>Early Dynamic Schema</h4>
Some readers can determine the source schema at the start of a scan.
For example, a CSV file has headers, a Parquet file has footers, both
of which define a schema. This case is called "early schema." The
reader fefines the schema by calling
<a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#tableSchema-org.apache.drill.exec.record.metadata.TupleMetadata-"><code>tableSchema(TupleMetadata)</code></a> to provide the known schema.
<h4>Late Dynamic Schema</h4>
Other readers don't know the input schema until the reader actually
reads the data. For example, JSON typically has no schema, but does
have sufficient structure (name/value pairs) to infer one.
<p>
The late schema reader calls <code>RowSetLoader#addColumn()</code> to
add each column as it is discovered during the scan.
<p>
Note that, to avoid schema conflicts, a late schema reader
<i><b>must</b></i> define the full set of columns in the first batch,
and must stick to that schema for all subsequent batches. This allows
the reader to look one batch ahead to learn the columns.
<p>
Drill, however, cannot predict the future. Without a defined schema,
downstream operators cannot know which columns might appear later
in the scan, with which types. Today this is a strong guideline.
Future versions may enforce this rule.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#batchSize-int-">batchSize</a></span>(int&nbsp;maxRecordsPerBatch)</code>
<div class="block">Set the preferred batch size (which may be overridden by the
result set loader in order to limit vector or batch size.)</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<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/impl/scan/v3/SchemaNegotiator.html#build--">build</a></span>()</code>
<div class="block">Build the schema, plan the required projections and static
columns and return a loader used to populate value vectors.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/drill/exec/ops/OperatorContext.html" title="interface in org.apache.drill.exec.ops">OperatorContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#context--">context</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<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/impl/scan/v3/SchemaNegotiator.html#errorContext--">errorContext</a></span>()</code>
<div class="block">Returns the error context to use for this reader: either the
parent or the reader-specific context set in
<a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#setErrorContext-org.apache.drill.common.exceptions.CustomErrorContext-"><code>setErrorContext(CustomErrorContext)</code></a>.</div>
</td>
</tr>
<tr id="i4" 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/impl/scan/v3/SchemaNegotiator.html#inputSchema--">inputSchema</a></span>()</code>
<div class="block">Returns the reader input schema: the schema which describes the
set of columns this reader should produce.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#isProjectionEmpty--">isProjectionEmpty</a></span>()</code>
<div class="block">Report whether the projection list is empty, as occurs in two
cases:
<tt>SELECT COUNT(*) ...</tt> -- empty project.
<tt>SELECT a, b FROM table(c d)</tt> -- disjoint project.
</div>
</td>
</tr>
<tr id="i6" 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/impl/scan/v3/SchemaNegotiator.html#parentErrorContext--">parentErrorContext</a></span>()</code>
<div class="block">The context to use as a parent when creating a custom context.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/schema/ProjectedColumn.html" title="class in org.apache.drill.exec.physical.impl.scan.v3.schema">ProjectedColumn</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#projectionFor-java.lang.String-">projectionFor</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;colName)</code>&nbsp;</td>
</tr>
<tr id="i8" 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/impl/scan/v3/SchemaNegotiator.html#providedSchema--">providedSchema</a></span>()</code>
<div class="block">Returns the provided schema, if defined.</div>
</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/physical/impl/scan/v3/SchemaNegotiator.html#schemaIsComplete-boolean-">schemaIsComplete</a></span>(boolean&nbsp;isComplete)</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/physical/impl/scan/v3/SchemaNegotiator.html#setErrorContext-org.apache.drill.common.exceptions.CustomErrorContext-">setErrorContext</a></span>(<a href="../../../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a>&nbsp;context)</code>
<div class="block">Specify an advanced error context which allows the reader to
fill in custom context values.</div>
</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/physical/impl/scan/v3/SchemaNegotiator.html#tableSchema-org.apache.drill.exec.record.metadata.TupleMetadata-">tableSchema</a></span>(<a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;schema)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#tableSchema-org.apache.drill.exec.record.metadata.TupleMetadata-boolean-">tableSchema</a></span>(<a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;schema,
boolean&nbsp;isComplete)</code>
<div class="block">Specify the table schema if this is an early-schema reader.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#userName--">userName</a></span>()</code>
<div class="block">Name of the user running the query.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="context--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>context</h4>
<pre><a href="../../../../../../../../org/apache/drill/exec/ops/OperatorContext.html" title="interface in org.apache.drill.exec.ops">OperatorContext</a>&nbsp;context()</pre>
</li>
</ul>
<a name="parentErrorContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parentErrorContext</h4>
<pre><a href="../../../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a>&nbsp;parentErrorContext()</pre>
<div class="block">The context to use as a parent when creating a custom context.
<p>
(Obtain the error context for this reader from the
<a href="../../../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet"><code>ResultSetLoader</code></a>.</div>
</li>
</ul>
<a name="setErrorContext-org.apache.drill.common.exceptions.CustomErrorContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setErrorContext</h4>
<pre>void&nbsp;setErrorContext(<a href="../../../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a>&nbsp;context)</pre>
<div class="block">Specify an advanced error context which allows the reader to
fill in custom context values.</div>
</li>
</ul>
<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>&nbsp;errorContext()</pre>
<div class="block">Returns the error context to use for this reader: either the
parent or the reader-specific context set in
<a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html#setErrorContext-org.apache.drill.common.exceptions.CustomErrorContext-"><code>setErrorContext(CustomErrorContext)</code></a>.</div>
</li>
</ul>
<a name="userName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>userName</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName()</pre>
<div class="block">Name of the user running the query.</div>
</li>
</ul>
<a name="isProjectionEmpty--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isProjectionEmpty</h4>
<pre>boolean&nbsp;isProjectionEmpty()</pre>
<div class="block">Report whether the projection list is empty, as occurs in two
cases:
<ul>
<li><tt>SELECT COUNT(*) ...</tt> -- empty project.</ul>
<li><tt>SELECT a, b FROM table(c d)</tt> -- disjoint project.</li>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if no columns are projected, and the client can
make use of <a href="../../../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html#skipRows-int-"><code>ResultSetLoader.skipRows(int)</code></a> to indicate the
row count, false if at least one column is projected and so
data must be written using the loader</dd>
</dl>
</li>
</ul>
<a name="projectionFor-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>projectionFor</h4>
<pre><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/schema/ProjectedColumn.html" title="class in org.apache.drill.exec.physical.impl.scan.v3.schema">ProjectedColumn</a>&nbsp;projectionFor(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;colName)</pre>
</li>
</ul>
<a name="providedSchema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>providedSchema</h4>
<pre><a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;providedSchema()</pre>
<div class="block">Returns the provided schema, if defined. The provided schema is a
description of the source schema viewed as a Drill schema.
<p>
If a schema is provided,
the reader should use that schema, converting or ignoring columns
as needed. A scan without a provided schema has a "dynamic" schema
to be defined by the scan operator itself along with the column
projection list.
<p>
The provided schema describes the columns that the reader is
capable of providing. Any given query may choose to project a subset
of these columns.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the provided schema if the execution plan defines the output
schema, <code>null</code> if the schema should be computed dynamically
from the source schema and column projections</dd>
</dl>
</li>
</ul>
<a name="inputSchema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inputSchema</h4>
<pre><a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;inputSchema()</pre>
<div class="block">Returns the reader input schema: the schema which describes the
set of columns this reader should produce. The schema can be
fully dynamic (a wildcard), fully concrete (a list of columns
and their types) or partially dynamic (a list of columns, but some
types are not known.) If the reader has a choice of ways to map
input columns to types, the reader must choose the type specified
in the schema. Presumably, the specified types are those that the
reader is capable of providing; there is no expectation that the
reader will convert to arbitrary types.
<p>
If the type is <code>LATE</code> (dynamic), then the reader can choose
the type. Subsequent readers in the same scan will then see the
same column as concrete, with the type selected by the present
reader.
<p>
The reader is free to add additional columns. The internal mechanism
will just ignore those columns and return a dummy reader for them.
<p>
The reader is also free to ignore columns. In this case, the internal
mechanism will fill in <code>NULL</code> or default values.</div>
</li>
</ul>
<a name="tableSchema-org.apache.drill.exec.record.metadata.TupleMetadata-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tableSchema</h4>
<pre>void&nbsp;tableSchema(<a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;schema,
boolean&nbsp;isComplete)</pre>
<div class="block">Specify the table schema if this is an early-schema reader. Need
not be called for a late-schema readers. The schema provided here,
if any, is a base schema: the reader is free to discover additional
columns during the read.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>schema</code> - the table schema if known at open time</dd>
<dd><code>isComplete</code> - true if the schema is complete: if it can be used
to define an empty schema-only batch for the first reader. Set to
false if the schema is partial: if the reader must read rows to
determine the full schema</dd>
</dl>
</li>
</ul>
<a name="tableSchema-org.apache.drill.exec.record.metadata.TupleMetadata-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tableSchema</h4>
<pre>void&nbsp;tableSchema(<a href="../../../../../../../../org/apache/drill/exec/record/metadata/TupleMetadata.html" title="interface in org.apache.drill.exec.record.metadata">TupleMetadata</a>&nbsp;schema)</pre>
</li>
</ul>
<a name="schemaIsComplete-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schemaIsComplete</h4>
<pre>void&nbsp;schemaIsComplete(boolean&nbsp;isComplete)</pre>
</li>
</ul>
<a name="batchSize-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>batchSize</h4>
<pre>void&nbsp;batchSize(int&nbsp;maxRecordsPerBatch)</pre>
<div class="block">Set the preferred batch size (which may be overridden by the
result set loader in order to limit vector or batch size.)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxRecordsPerBatch</code> - preferred number of record per batch</dd>
</dl>
</li>
</ul>
<a name="build--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre><a href="../../../../../../../../org/apache/drill/exec/physical/resultSet/ResultSetLoader.html" title="interface in org.apache.drill.exec.physical.resultSet">ResultSetLoader</a>&nbsp;build()</pre>
<div class="block">Build the schema, plan the required projections and static
columns and return a loader used to populate value vectors.
If the select list includes a subset of table columns, then
the loader will be set up in table schema order, but the unneeded
column loaders will be null, meaning that the batch reader should
skip setting those columns.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the loader for the table with columns arranged in table
schema order</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/SchemaNegotiator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../../org/apache/drill/exec/physical/impl/scan/v3/ScanLifecycleBuilder.SchemaValidator.html" title="interface in org.apache.drill.exec.physical.impl.scan.v3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/apache/drill/exec/physical/impl/scan/v3/SchemaNegotiator.html" target="_top">Frames</a></li>
<li><a href="SchemaNegotiator.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>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1970 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>