public class MiniPlanUnitTestBase.PopBuilder extends Object
LegacyOperatorTestBuilder, build a physical operator (RecordBatch) and specify its input record batches.
The input record batch could be a non-scan operator by calling addInputAsChild(),
or a scan operator by calling addJsonScanAsChild() if it's SCAN operator.
A miniplan rooted as join operator like following could be constructed in either the following way:
Join
/ \
JSON_T1 Filter
\
JSON_T2
new PopBuilder()
.physicalOperator(joinPopConfig)
.addScanAsChild()
.fileSystem(..)
.columnsToRead(...)
.inputPath(...)
.buildAddAsInput()
.addInputAsChild()
.physicalOperator(filterPopConfig)
.addScanAsChild()
.fileSystem(...)
.columnsToRead(...)
.inputPath(...)
.buildAddAsInput()
.buildAddAsInput()
.build();
RecordBatch scan1 = new ScanPopBuilder()
.fileSystem(...)
.columnsToRead(..)
.inputPath(...)
.build();
RecordBatch scan2 = ... ;
RecordBatch filter = new PopBuilder()
.physicalOperator(filterPopConfig)
.addInput(scan2);
RecordBatch join = new PopBuilder()
.physicalOperator(joinPopConfig)
.addInput(scan1)
.addInput(filter)
.build();
| Modifier and Type | Field and Description |
|---|---|
protected long |
initReservation |
protected long |
maxAllocation |
protected PhysicalOperator |
popConfig |
| Constructor and Description |
|---|
PopBuilder() |
PopBuilder(MiniPlanUnitTestBase.PopBuilder parent) |
| Modifier and Type | Method and Description |
|---|---|
MiniPlanUnitTestBase.PopBuilder |
addInput(RecordBatch batch) |
MiniPlanUnitTestBase.PopBuilder |
addInputAsChild()
Return a nested PopBuilder to build a non-scan recordBatch, which will be added as input batch after
call
buildAddAsInput() |
MiniPlanUnitTestBase.JsonScanBuilder |
addJsonScanAsChild()
Return a ScanPopBuilder to build a Scan recordBatch, which will be added as input batch after
call
buildAddAsInput() |
MiniPlanUnitTestBase.ParquetScanBuilder |
addParquetScanAsChild()
Return a ScanPopBuilder to build a Scan recordBatch, which will be added as input batch after
call
buildAddAsInput() |
RecordBatch |
build() |
MiniPlanUnitTestBase.PopBuilder |
buildAddAsInput() |
MiniPlanUnitTestBase.PopBuilder |
initReservation(long initReservation)
Set initial memory reservation used by this operator's allocator.
|
MiniPlanUnitTestBase.PopBuilder |
maxAllocation(long maxAllocation)
Set max memory reservation used by this operator's allocator.
|
MiniPlanUnitTestBase.PopBuilder |
physicalOperator(PhysicalOperator popConfig) |
protected PhysicalOperator popConfig
protected long initReservation
protected long maxAllocation
public PopBuilder()
public PopBuilder(MiniPlanUnitTestBase.PopBuilder parent)
public MiniPlanUnitTestBase.PopBuilder physicalOperator(PhysicalOperator popConfig)
public MiniPlanUnitTestBase.PopBuilder initReservation(long initReservation)
AbstractBase.INIT_ALLOCATIONinitReservation - public MiniPlanUnitTestBase.PopBuilder maxAllocation(long maxAllocation)
AbstractBase.MAX_ALLOCATIONmaxAllocation - public MiniPlanUnitTestBase.JsonScanBuilder addJsonScanAsChild()
buildAddAsInput()public MiniPlanUnitTestBase.ParquetScanBuilder addParquetScanAsChild()
buildAddAsInput()public MiniPlanUnitTestBase.PopBuilder addInputAsChild()
buildAddAsInput()public MiniPlanUnitTestBase.PopBuilder addInput(RecordBatch batch)
public MiniPlanUnitTestBase.PopBuilder buildAddAsInput() throws Exception
Exceptionpublic RecordBatch build() throws Exception
ExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.