public class LateralJoinBatch extends AbstractBinaryRecordBatch<LateralJoinPOP> implements LateralContract
LateralContract
.AbstractBinaryRecordBatch.Metric
AbstractRecordBatch.BatchState
RecordBatch.IterOutcome
batchMemoryManager, left, LEFT_INDEX, leftUpstream, numInputs, right, RIGHT_INDEX, rightUpstream
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabled
MAX_BATCH_ROW_COUNT
Constructor and Description |
---|
LateralJoinBatch(LateralJoinPOP popConfig,
FragmentContext context,
RecordBatch left,
RecordBatch right) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildSchema()
Prefetch a batch from left and right branch to know about the schema of each side.
|
protected void |
cancelIncoming() |
void |
close() |
void |
dump()
Perform dump of this batch's state to logs.
|
RecordBatch |
getIncoming()
Returns the left side incoming for the Lateral Join.
|
RecordBatch.IterOutcome |
getLeftOutcome()
Returns the current
RecordBatch.IterOutcome for the left incoming batch |
int |
getRecordCount()
Get the number of records.
|
int |
getRecordIndex()
Returns the current row index which the calling operator should process in
current incoming left record batch.
|
RecordBatch.IterOutcome |
innerNext()
Gets the left and right incoming batch and produce the output batch.
|
protected boolean |
prefetchFirstBatchFromBothSides()
Get the left and right batch during build schema phase for
LateralJoinBatch . |
void |
setMaxOutputRowCount(int outputRowCount)
Used only for testing for cases when multiple output batches are produced for same input set
|
void |
setUseMemoryManager(boolean useMemoryManager)
Used only for testing to disable output batch calculation using memory manager and instead use the static max
value set by
setMaxOutputRowCount(int) |
checkForEarlyFinish, getBatchMemoryManager, updateBatchMemoryManagerStats, verifyOutcomeToSetBatchState
cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector2, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, isRecordBatchStatsLoggingEnabled, iterator, next, next, next, schemaChangeException, schemaChangeException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public LateralJoinBatch(LateralJoinPOP popConfig, FragmentContext context, RecordBatch left, RecordBatch right) throws OutOfMemoryException
OutOfMemoryException
public RecordBatch.IterOutcome innerNext()
innerNext
in class AbstractRecordBatch<LateralJoinPOP>
public void close()
close
in interface AutoCloseable
close
in class AbstractRecordBatch<LateralJoinPOP>
public int getRecordCount()
VectorAccessible
getRecordCount
in interface VectorAccessible
public RecordBatch getIncoming()
leftJoinIndex
.getIncoming
in interface LateralContract
public int getRecordIndex()
getRecordIndex
in interface LateralContract
public RecordBatch.IterOutcome getLeftOutcome()
RecordBatch.IterOutcome
for the left incoming batchgetLeftOutcome
in interface LateralContract
protected boolean prefetchFirstBatchFromBothSides()
LateralJoinBatch
. If left batch sees a failure outcome then we
don't even call next on right branch, since there is no left incoming.prefetchFirstBatchFromBothSides
in class AbstractBinaryRecordBatch<LateralJoinPOP>
protected void buildSchema()
buildSchema
in class AbstractRecordBatch<LateralJoinPOP>
SchemaChangeException
- if batch schema was changed during executionprotected void cancelIncoming()
cancelIncoming
in class AbstractBinaryRecordBatch<LateralJoinPOP>
public void setMaxOutputRowCount(int outputRowCount)
outputRowCount
- - Max rows that output batch can holdpublic void setUseMemoryManager(boolean useMemoryManager)
setMaxOutputRowCount(int)
useMemoryManager
- - false - disable memory manager update to take effect, true enable memory manager updatepublic void dump()
RecordBatch
dump
in interface RecordBatch
Copyright © 1970 The Apache Software Foundation. All rights reserved.