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
Fields inherited from interface org.apache.drill.exec.store.RecordReader
ALLOCATOR_INITIAL_RESERVATION, ALLOCATOR_MAX_RESERVATION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(Map<String, ValueVector> vectorMap) protected Collection<SchemaPath>
protected List<SchemaPath>
boolean
hasNext()
Check if the reader may have potentially more data to be read in subsequent iterations.protected boolean
Returns true if reader should skip all of the columns, reporting number of records only.protected boolean
protected final void
setColumns
(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, wait
Methods inherited from interface java.lang.AutoCloseable
close
Methods 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:
allocate
in interfaceRecordReader
- Throws:
OutOfMemoryException
-
hasNext
public boolean hasNext()Description copied from interface:RecordReader
Check 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:
hasNext
in interfaceRecordReader
- Returns:
- return true if there could potentially be more reads, false otherwise
-
getDefaultColumnsToRead
-