Class FixedReceiver.Builder
java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.FixedReceiver.Builder
- Enclosing class:
- FixedReceiver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(TupleMetadata readerSchema) Create a fixed receiver for the provided schema (if any) in the scan plan, and the given reader schema.Provides access to the conversion builder to add custom properties.static TupleMetadata
mergeSchemas
(TupleMetadata providedSchema, TupleMetadata readerSchema) Given a desired provided schema and an actual reader schema, create a merged schema that contains the provided column where available, but the reader column otherwise.Mark that the reader schema provided tobuild(TupleMetadata)
contains all columns that this reader will deliver.
-
Constructor Details
-
Builder
-
-
Method Details
-
conversionBuilder
Provides access to the conversion builder to add custom properties. -
schemaIsComplete
Mark that the reader schema provided tobuild(TupleMetadata)
contains all columns that this reader will deliver. Allows some optimizations. SeeSchemaNegotiator.schemaIsComplete(boolean)
. -
build
Create a fixed receiver for the provided schema (if any) in the scan plan, and the given reader schema. Assumes no new columns will be added later in the read. -
mergeSchemas
Given a desired provided schema and an actual reader schema, create a merged schema that contains the provided column where available, but the reader column otherwise. Copies provided properties to the output schema.The result is the schema to use when creating column writers: it reflects the type of the target vector. The reader is responsible for converting from the (possibly different) reader column type to the provided column type.
Note: the provided schema should only contain types that the reader is prepared to offer: there is no requirement that the reader support every possible conversion, only those that make sense for that one reader.
- Parameters:
providedSchema
- the provided schema fromCREATE SCHEMA
readerSchema
- the set of column types that the reader can provide "natively"- Returns:
- a merged schema to use when creating the
ResultSetLoader
-