Package org.apache.drill.exec.store
Class AbstractRecordReader
java.lang.Object
org.apache.drill.exec.store.AbstractRecordReader
- All Implemented Interfaces:
AutoCloseable,RecordReader
- Direct Known Subclasses:
AbstractPojoRecordReader,CommonParquetRecordReader,DruidRecordReader,FindLimit0Visitor.RelDataTypeReader,HBaseRecordReader,HiveDefaultRecordReader,JSONRecordReader,KuduRecordReader,MockRecordReader,MongoRecordReader,OpenTSDBRecordReader
-
Field Summary
FieldsFields inherited from interface org.apache.drill.exec.store.RecordReader
ALLOCATOR_INITIAL_RESERVATION, ALLOCATOR_MAX_RESERVATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallocate(Map<String, ValueVector> vectorMap) protected Collection<SchemaPath> protected List<SchemaPath> booleanhasNext()Check if the reader may have potentially more data to be read in subsequent iterations.protected booleanReturns true if reader should skip all of the columns, reporting number of records only.protected booleanprotected final voidsetColumns(Collection<SchemaPath> projected) toString()protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> projected) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface org.apache.drill.exec.store.RecordReader
next, setup
-
Field Details
-
DEFAULT_TEXT_COLS_TO_READ
-
-
Constructor Details
-
AbstractRecordReader
public AbstractRecordReader()
-
-
Method Details
-
toString
-
setColumns
- Parameters:
projected- : The column list to be returned from this RecordReader. 1) empty column list: this is for skipAll query. It's up to each storage-plugin to choose different policy of handling skipAll query. By default, it will use * column. 2) NULL : is NOT allowed. It requires the planner's rule, or GroupScan or ScanBatchCreator to handle NULL.
-
getColumns
-
transformColumns
-
isStarQuery
protected boolean isStarQuery() -
isSkipQuery
protected boolean isSkipQuery()Returns true if reader should skip all of the columns, reporting number of records only. Handling of a skip query is storage plugin-specific. -
allocate
- Specified by:
allocatein interfaceRecordReader- Throws:
OutOfMemoryException
-
hasNext
public boolean hasNext()Description copied from interface:RecordReaderCheck if the reader may have potentially more data to be read in subsequent iterations. Certain types of readers such as repeatable readers can be invoked multiple times, so this method will allow ScanBatch to check with the reader before closing it.- Specified by:
hasNextin interfaceRecordReader- Returns:
- return true if there could potentially be more reads, false otherwise
-
getDefaultColumnsToRead
-