public class TestLimitBatchEmitOutcome extends BaseTestOpBatchEmitOutcome
PhysicalOpUnitTestBase.BatchIterator, PhysicalOpUnitTestBase.MockExecutorFragmentContext, PhysicalOpUnitTestBase.MockPhysicalOperatoremptyInputRowSet, inputContainer, inputContainerSv2, inputOutcomes, inputSchema, nonEmptyInputRowSet, outputRecordCountclasspathScan, dirTestWatcher, drillbitContext, drillConf, fragContext, opContext, opCreatorReg, operatorFixture, scanDecodeExecutor, scanExecutorc, optionManager| Constructor and Description |
|---|
TestLimitBatchEmitOutcome() |
| Modifier and Type | Method and Description |
|---|---|
void |
testLimitEmptyBatchEmitOutcome()
Test to show empty batch with both OK_NEW_SCHEMA and EMIT outcome is not
ignored by Limit and is pass through to the downstream operator.
|
void |
testLimitNonEmptyBatchEmitOutcome()
Test to validate limit considers all the data until it sees EMIT outcome
and return output batch with data that meets the limit criteria.
|
void |
testLimitNonEmptyFirst_EmptyOKEmitOutcome()
Test to show that when the limit number of records is found with first
incoming batch, then next empty incoming batch with OK outcome is ignored,
but the empty EMIT outcome batch is not ignored.
|
void |
testLimitNonEmptyFirst_NonEmptyOK_EmptyBatchEmitOutcome()
Test shows that limit operates on multiple input batches until it finds
limit number of records or it sees an EMIT outcome to refresh it's state.
|
void |
testLimitResetsAfterFirstEmitOutcome()
Test to show that once a limit number of records is produced using first
set of batches then on getting a batch with EMIT outcome, the limit state
is again refreshed and applied to next set of batches with data.
|
void |
testMultipleLimitWithEMITOutcome()
Test to show that limit refreshes it's state after seeing first EMIT
outcome and works on data batches following it as new set's of incoming
batch and apply the limits rule from fresh on those.
|
afterTest, beforeTest, setUpBeforeClassgetJsonReadersFromBatchString, getJsonReadersFromInputFiles, getOpCreatorReg, getReaderListForJsonBatches, joinCond, legacyOpTestBuilder, mockFragmentContext, mockOpContext, opTestBuilder, ordering, parseExprs, setup, teardownclear, getLocalFileSystem, mockDrillbitContext, mockUsDateFormatSymbols, mockUtcDateTimeZone, parseExpr, setupOptionManagerpublic void testLimitEmptyBatchEmitOutcome()
throws Throwable
Throwablepublic void testLimitNonEmptyBatchEmitOutcome()
throws Throwable
Throwablepublic void testLimitResetsAfterFirstEmitOutcome()
throws Throwable
Throwablepublic void testLimitNonEmptyFirst_EmptyOKEmitOutcome()
throws Throwable
Throwablepublic void testMultipleLimitWithEMITOutcome()
throws Throwable
After seeing EMIT, it refreshes it's state and operate on next input batches to again return limit number of records. So for 3rd batch with 2 records but with EMIT outcome it produces an output batch with 2 records not with 1 since state is refreshed.
Throwablepublic void testLimitNonEmptyFirst_NonEmptyOK_EmptyBatchEmitOutcome()
throws Throwable
ThrowableCopyright © 2022 The Apache Software Foundation. All rights reserved.