Enum ScanLevelProjection.ScanProjectionType
java.lang.Object
java.lang.Enum<ScanLevelProjection.ScanProjectionType>
org.apache.drill.exec.physical.impl.scan.project.ScanLevelProjection.ScanProjectionType
- All Implemented Interfaces:
Serializable
,Comparable<ScanLevelProjection.ScanProjectionType>
- Enclosing class:
- ScanLevelProjection
public static enum ScanLevelProjection.ScanProjectionType
extends Enum<ScanLevelProjection.ScanProjectionType>
Identifies the kind of projection done for this scan.
-
Enum Constant Summary
Enum ConstantDescriptionNo projection.Explicit projection.Wildcard query expanded using an output schema.Wildcard query expanded using an output schema in "strict" mode.Wildcard. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EMPTY
No projection. Occurs for SELECT COUNT(*) ... queries. -
WILDCARD
Wildcard. Occurs for SELECT * ... queries when no output schema is available. The scan projects all columns from all readers, using the type from that reader. Schema "smoothing", if enabled, will attempt to preserve column order, type and mode from one reader to the next. -
EXPLICIT
Explicit projection. Occurs for SELECT a, b, c ... queries, whether or not an output schema is present. In this case, the projection list identifies the set of columns to project and their order. The output schema, if present, specifies data types and modes. -
SCHEMA_WILDCARD
Wildcard query expanded using an output schema. Occurs for a SELECT * ... query with an output schema. The set of projected columns are those from the output schema, in the order specified by the schema, with names (and name case) specified by the schema. In this mode, the schema is partial: readers may include additional columns which are appended to those provided by the schema.TODO: Provide a strict mode that forces the use of the types and modes from the output schema. In lenient mode, the framework will adjust mode to allow the query to succeed (changing a required mode to optional, say, if the column is not provided by the reader and has no default. Strict mode would fail the query in this case.)
TODO: Enable schema smoothing in this case: use that mechanism to smooth over the "extra" reader columns.
-
STRICT_SCHEMA_WILDCARD
Wildcard query expanded using an output schema in "strict" mode. Only columns from the output schema will be projected. If a reader offers columns not in the output schema, they will be ignored. That is, a SELECT * query expands to exactly the columns in the schema.TODO: Provide a strict column mode that will fail the query if a projected column is required, has no default, and is not provided by the reader. In the normal lenient mode, the scan framework will adjust the data mode to optional so that the query will run.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isWildcard
public boolean isWildcard()
-