Class LimitRecordBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<Limit>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<Limit>
org.apache.drill.exec.record.AbstractSingleRecordBatch<Limit>
org.apache.drill.exec.physical.impl.limit.LimitRecordBatch
- All Implemented Interfaces:
AutoCloseable,Iterable<VectorWrapper<?>>,CloseableRecordBatch,RecordBatch,VectorAccessible
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractRecordBatch
AbstractRecordBatch.BatchStateNested classes/interfaces inherited from interface org.apache.drill.exec.record.RecordBatch
RecordBatch.IterOutcome -
Field Summary
Fields inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
incomingFields inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
callBackFields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabledFields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionLimitRecordBatch(Limit popConfig, FragmentContext context, RecordBatch incoming) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected RecordBatch.IterOutcomedoWork()voiddump()Perform dump of this batch's state to logs.protected RecordBatch.IterOutcomegetFinalOutcome(boolean hasRemainder) Gets the outcome to return from super implementation and then in case of EMIT outcome it refreshes the state of operator.intGet the number of records.protected booleanMethods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getIncomingMethods inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
cancelIncoming, getLastKnownOutcome, handleNullInput, setLastKnownOutcomeMethods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
buildSchema, cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, isRecordBatchStatsLoggingEnabled, iterator, next, next, next, schemaChangeException, schemaChangeExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LimitRecordBatch
public LimitRecordBatch(Limit popConfig, FragmentContext context, RecordBatch incoming) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
innerNext
- Overrides:
innerNextin classAbstractUnaryRecordBatch<Limit>
-
getSelectionVector2
- Specified by:
getSelectionVector2in interfaceVectorAccessible- Overrides:
getSelectionVector2in classAbstractRecordBatch<Limit>
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessibleGet the number of records.- Returns:
- number of records
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classAbstractRecordBatch<Limit>
-
setupNewSchema
protected boolean setupNewSchema()- Specified by:
setupNewSchemain classAbstractUnaryRecordBatch<Limit>
-
getFinalOutcome
Gets the outcome to return from super implementation and then in case of EMIT outcome it refreshes the state of operator. Refresh is done to again apply limit on all the future incoming batches which will be part of next record boundary.- Overrides:
getFinalOutcomein classAbstractSingleRecordBatch<Limit>- Parameters:
hasRemainder-- Returns:
- - IterOutcome to send downstream
-
doWork
- Specified by:
doWorkin classAbstractUnaryRecordBatch<Limit>
-
dump
public void dump()Description copied from interface:RecordBatchPerform dump of this batch's state to logs.
-