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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidallowRequiredNullColumns(boolean flag) voidbatchByteLimit(int byteLimit) voidbatchRecordLimit(int batchRecordLimit) Specify a custom batch record count.abstract ScanOperatorEventsbuildScanOperator(FragmentContext fragContext, PhysicalOperator pop) voiddisableEmptyResults(boolean option) voidenableSchemaBatch(boolean option) voidenableSchemaSmoothing(boolean flag) Enable schema smoothing: introduces an addition level of schema resolution each time a schema changes from a reader.voiderrorContext(CustomErrorContext context) longlimit()voidlimit(long limit) voidnullType(TypeProtos.MajorType nullType) Specify the type to use for null columns in place of the standard nullable int.voidprojection(List<SchemaPath> projection) voidprovidedSchema(TupleMetadata providedSchema) voidwithImplicitColumns(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
-