Class FileMetadataColumn
java.lang.Object
org.apache.drill.exec.physical.impl.scan.project.ResolvedColumn
org.apache.drill.exec.physical.impl.scan.file.MetadataColumn
org.apache.drill.exec.physical.impl.scan.file.FileMetadataColumn
- All Implemented Interfaces:
ColumnProjection
,ConstantColumnLoader.ConstantColumnSpec
Represents projection column which resolved to a file metadata
(AKA "implicit") column such as "filename", "fqn", etc. These
columns are "synthetic" added by the scan framework itself
rather than "organic" coming from the scanned table.
-
Constructor Summary
ConstructorDescriptionFileMetadataColumn
(String name, FileMetadataColumnDefn defn) Constructor for unresolved column.FileMetadataColumn
(String name, FileMetadataColumnDefn defn, FileMetadata fileInfo, VectorSource source, int sourceIndex) Constructor for resolved column. -
Method Summary
Modifier and TypeMethodDescriptiondefn()
resolve
(FileMetadata fileInfo, VectorSource source, int sourceIndex) Methods inherited from class org.apache.drill.exec.physical.impl.scan.file.MetadataColumn
name, schema, toString, value
Methods inherited from class org.apache.drill.exec.physical.impl.scan.project.ResolvedColumn
metadata, project, source, sourceIndex
-
Constructor Details
-
FileMetadataColumn
public FileMetadataColumn(String name, FileMetadataColumnDefn defn, FileMetadata fileInfo, VectorSource source, int sourceIndex) Constructor for resolved column. The column is resolved at the file level once we identify the file to which the column is bound.- Parameters:
name
- name of the column as given in the projection listdefn
- definition of the metadata columnfileInfo
- description of the file used in this scan. Used to populate the value of this column on a per-file basissource
- handle to the a logical batch that holds the vectors to be populated in each row batchsourceIndex
- the location of the vector to populate
-
FileMetadataColumn
Constructor for unresolved column. A column is unresolved at the scan level: we know that this is a file metadata column, but we don't yet know the file to which to bind the column- Parameters:
name
- name of the column as given in the projection listdefn
- definition of the metadata column
-
-
Method Details
-
defn
-
resolve
- Specified by:
resolve
in classMetadataColumn
-