Class StatisticsMergeBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<StatisticsMerge>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<StatisticsMerge>
org.apache.drill.exec.record.AbstractSingleRecordBatch<StatisticsMerge>
org.apache.drill.exec.physical.impl.statistics.StatisticsMergeBatch
- All Implemented Interfaces:
AutoCloseable,Iterable<VectorWrapper<?>>,CloseableRecordBatch,RecordBatch,VectorAccessible
Example input and output:
Schema of incoming batch:
"columns" : MAP - Column names
"region_id" : VARCHAR
"sales_city" : VARCHAR
"cnt" : VARCHAR
"statscount" : MAP - Number of entries (rows)
"region_id" : BIGINT - statscount(region_id)
in incoming batch
"sales_city" : BIGINT - statscount(sales_city)
"cnt" : BIGINT - statscount(cnt)
"nonnullstatcount" : MAP - Number of non-null entries (rows)
"region_id" : BIGINT - nonnullstatcount(region_id)
"sales_city" : BIGINT - nonnullstatcount(sales_city)
"cnt" : BIGINT - nonnullstatcount(cnt)
.... another map for next stats function ....
Schema of outgoing batch:
"schema" : BIGINT - Schema number. For each schema change this number is incremented.
"computed" : DATE - What time is it computed?
"columns" : MAP - Column names
"region_id" : VARCHAR
"sales_city" : VARCHAR
"cnt" : VARCHAR
"statscount" : MAP - Number of entries (rows)
"region_id" : BIGINT - statscount(region_id) - aggregation over all values of region_id
in incoming batch
"sales_city" : BIGINT - statscount(sales_city)
"cnt" : BIGINT - statscount(cnt)
"nonnullstatcount" : MAP - Number of non-null entries (rows)
"region_id" : BIGINT - nonnullstatcount(region_id)
"sales_city" : BIGINT - nonnullstatcount(sales_city)
"cnt" : BIGINT - nonnullstatcount(cnt)
.... another map for next stats function ....
-
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
ConstructorsConstructorDescriptionStatisticsMergeBatch(StatisticsMerge popConfig, RecordBatch incoming, FragmentContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected RecordBatch.IterOutcomedoWork()voiddump()Perform dump of this batch's state to logs.intGet the number of records.protected booleanMethods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getFinalOutcome, 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, close, getContainer, getContext, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector2, 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
-
StatisticsMergeBatch
public StatisticsMergeBatch(StatisticsMerge popConfig, RecordBatch incoming, FragmentContext context) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
setupNewSchema
protected boolean setupNewSchema()- Specified by:
setupNewSchemain classAbstractUnaryRecordBatch<StatisticsMerge>
-
doWork
- Specified by:
doWorkin classAbstractUnaryRecordBatch<StatisticsMerge>
-
getOutgoingContainer
- Specified by:
getOutgoingContainerin interfaceRecordBatch- Overrides:
getOutgoingContainerin classAbstractRecordBatch<StatisticsMerge>
-
dump
public void dump()Description copied from interface:RecordBatchPerform dump of this batch's state to logs. -
innerNext
- Overrides:
innerNextin classAbstractUnaryRecordBatch<StatisticsMerge>
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessibleGet the number of records.- Returns:
- number of records
-