Class ScanSchemaOrchestrator.ScanOrchestratorBuilder
java.lang.Object
org.apache.drill.exec.physical.impl.scan.project.ScanSchemaOrchestrator.ScanOrchestratorBuilder
- Direct Known Subclasses:
ManagedScanFramework.ScanFrameworkBuilder
- Enclosing class:
- ScanSchemaOrchestrator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
allowRequiredNullColumns
(boolean flag) void
batchByteLimit
(int byteLimit) void
batchRecordLimit
(int batchRecordLimit) Specify a custom batch record count.abstract ScanOperatorEvents
buildScanOperator
(FragmentContext fragContext, PhysicalOperator pop) void
disableEmptyResults
(boolean option) void
enableSchemaBatch
(boolean option) void
enableSchemaSmoothing
(boolean flag) Enable schema smoothing: introduces an addition level of schema resolution each time a schema changes from a reader.void
errorContext
(CustomErrorContext context) long
limit()
void
limit
(long limit) void
nullType
(TypeProtos.MajorType nullType) Specify the type to use for null columns in place of the standard nullable int.void
projection
(List<SchemaPath> projection) void
providedSchema
(TupleMetadata providedSchema) void
withImplicitColumns
(MetadataManager metadataMgr) Specify an optional metadata manager.
-
Field Details
-
disableEmptyResults
public boolean disableEmptyResultsOption to disable empty results. An empty result occurs if no reader has any data, but at least one reader can provide a schema. In this case, the scan can return a single, empty batch, with an associated schema. This is the correct SQL result for an empty query. However, if this result triggers empty-batch bugs in other operators, we can, instead, disable this feature and return a null result set: no schema, no batch, just a "fast NONE", an immediate return of NONE from the Volcano iterator.Disabling this option is not desirable: it means that the user gets no schema for queries that should be able to return one. So, disable this option only if we cannot find or fix empty-batch bugs.
-
-
Constructor Details
-
ScanOrchestratorBuilder
public ScanOrchestratorBuilder()
-
-
Method Details
-
withImplicitColumns
Specify an optional metadata manager. Metadata is a set of constant columns with per-reader values. For file-based sources, this is usually the implicit and partition columns; but it could be other items for other data sources.- Parameters:
metadataMgr
- the application-specific metadata manager to use for this scan
-
batchRecordLimit
public void batchRecordLimit(int batchRecordLimit) Specify a custom batch record count. This is the maximum number of records per batch for this scan. Readers can adjust this, but the adjustment is capped at the value specified here- Parameters:
batchRecordLimit
- maximum records per batch
-
batchByteLimit
public void batchByteLimit(int byteLimit) -
nullType
Specify the type to use for null columns in place of the standard nullable int. This type is used for all missing columns. (Readers that need per-column control need a different mechanism.)- Parameters:
nullType
- the type to use for null columns
-
enableSchemaSmoothing
public void enableSchemaSmoothing(boolean flag) Enable schema smoothing: introduces an addition level of schema resolution each time a schema changes from a reader.- Parameters:
flag
- true to enable schema smoothing, false to disable
-
allowRequiredNullColumns
public void allowRequiredNullColumns(boolean flag) -
addParser
-
addResolver
-
projection
-
enableSchemaBatch
public void enableSchemaBatch(boolean option) -
disableEmptyResults
public void disableEmptyResults(boolean option) -
providedSchema
-
providedSchema
-
limit
public void limit(long limit) -
limit
public long limit() -
errorContext
-
errorContext
-
buildScan
-
buildScanOperator
-
buildEvents
-