public class PhysicalOpUnitTestBase extends ExecTest
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PhysicalOpUnitTestBase.BatchIterator |
protected static class |
PhysicalOpUnitTestBase.MockExecutorFragmentContext
Note
|
static class |
PhysicalOpUnitTestBase.MockPhysicalOperator
Note
|
| Modifier and Type | Field and Description |
|---|---|
protected ScanResult |
classpathScan |
BaseDirTestWatcher |
dirTestWatcher |
protected DrillbitContext |
drillbitContext |
protected DrillConfig |
drillConf |
protected PhysicalOpUnitTestBase.MockExecutorFragmentContext |
fragContext |
protected OperatorFixture.MockOperatorContext |
opContext |
protected OperatorCreatorRegistry |
opCreatorReg |
protected OperatorFixture |
operatorFixture |
protected ExecutorService |
scanDecodeExecutor |
protected ExecutorService |
scanExecutor |
c, optionManager| Constructor and Description |
|---|
PhysicalOpUnitTestBase() |
| Modifier and Type | Method and Description |
|---|---|
static Iterator<RecordReader> |
getJsonReadersFromBatchString(List<String> jsonBatches,
FragmentContext fragContext,
List<SchemaPath> columnsToRead)
Create
JSONRecordReader from input strings. |
static Iterator<RecordReader> |
getJsonReadersFromInputFiles(DrillFileSystem fs,
List<org.apache.hadoop.fs.Path> inputPaths,
FragmentContext fragContext,
List<SchemaPath> columnsToRead)
Create JSONRecordReader from files on a file system.
|
protected OperatorCreatorRegistry |
getOpCreatorReg() |
List<RecordReader> |
getReaderListForJsonBatches(List<String> jsonBatches,
FragmentContext fragContext) |
protected JoinCondition |
joinCond(String leftExpr,
String relationship,
String rightExpr) |
protected LegacyOperatorTestBuilder |
legacyOpTestBuilder()
Deprecated.
Use
opTestBuilder() instead. |
protected void |
mockFragmentContext() |
protected void |
mockOpContext(PhysicalOperator popConfig,
long initReservation,
long maxAllocation) |
protected OperatorTestBuilder |
opTestBuilder()
Gets an
OperatorTestBuilder. |
protected Order.Ordering |
ordering(String expression,
org.apache.calcite.rel.RelFieldCollation.Direction direction,
org.apache.calcite.rel.RelFieldCollation.NullDirection nullDirection) |
protected List<NamedExpression> |
parseExprs(String... expressionsAndOutputNames) |
void |
setup() |
void |
teardown() |
clear, getLocalFileSystem, mockDrillbitContext, mockUsDateFormatSymbols, mockUtcDateTimeZone, parseExpr, setupOptionManagerprotected PhysicalOpUnitTestBase.MockExecutorFragmentContext fragContext
protected DrillbitContext drillbitContext
protected OperatorFixture.MockOperatorContext opContext
protected OperatorFixture operatorFixture
protected ExecutorService scanExecutor
protected ExecutorService scanDecodeExecutor
public final BaseDirTestWatcher dirTestWatcher
protected final DrillConfig drillConf
protected final ScanResult classpathScan
protected final OperatorCreatorRegistry opCreatorReg
public void teardown()
protected Order.Ordering ordering(String expression, org.apache.calcite.rel.RelFieldCollation.Direction direction, org.apache.calcite.rel.RelFieldCollation.NullDirection nullDirection)
protected JoinCondition joinCond(String leftExpr, String relationship, String rightExpr)
protected List<NamedExpression> parseExprs(String... expressionsAndOutputNames)
@Deprecated protected LegacyOperatorTestBuilder legacyOpTestBuilder()
opTestBuilder() instead.LegacyOperatorTestBuilder.LegacyOperatorTestBuilder.protected OperatorTestBuilder opTestBuilder()
OperatorTestBuilder.OperatorTestBuilder.protected void mockOpContext(PhysicalOperator popConfig, long initReservation, long maxAllocation) throws Exception
Exceptionprotected OperatorCreatorRegistry getOpCreatorReg()
public List<RecordReader> getReaderListForJsonBatches(List<String> jsonBatches, FragmentContext fragContext)
public static Iterator<RecordReader> getJsonReadersFromBatchString(List<String> jsonBatches, FragmentContext fragContext, List<SchemaPath> columnsToRead)
JSONRecordReader from input strings.jsonBatches - : list of input strings, each element represent a batch. Each string could either
be in the form of "[{...}, {...}, ..., {...}]", or in the form of "{...}".fragContext - : fragment contextcolumnsToRead - : list of schema paths to read from JSON reader.JSONRecordReader corresponding to each given jsonBatch.public static Iterator<RecordReader> getJsonReadersFromInputFiles(DrillFileSystem fs, List<org.apache.hadoop.fs.Path> inputPaths, FragmentContext fragContext, List<SchemaPath> columnsToRead)
fs - : file system.inputPaths - : list of .json file paths.fragContext - columnsToRead - JSONRecordReader corresponding to each given input path.Copyright © 2022 The Apache Software Foundation. All rights reserved.