public class TestScanLifecycleTwoReaders extends BaseTestScanLifecycle
BaseTestScanLifecycle.BaseMockBatchReader, BaseTestScanLifecycle.DummySubScan, BaseTestScanLifecycle.FailingReader, BaseTestScanLifecycle.MockEarlySchemaReader, BaseTestScanLifecycle.MockEarlySchemaTypeConflictReader, BaseTestScanLifecycle.MockEmptySchemaReader, BaseTestScanLifecycle.MockLateSchemaReader, BaseTestScanLifecycle.MockLateSchemaTypeConflictReader, BaseTestScanLifecycle.MockModeConflictReader, BaseTestScanLifecycle.MockReorderedReader, BaseTestScanLifecycle.MockSingleColReader, BaseTestScanLifecycle.MockThreeColReader, BaseTestScanLifecycle.NoDataReader, BaseTestScanLifecycle.SingleReaderFactory, BaseTestScanLifecycle.TwoReaderFactoryDrillTest.MemWatcherCONFLICT_SCHEMA, SCHEMAdirTestWatcher, fixturelogOutcome, objectMapper, REPEAT_RULE, thrownException, TIMEOUT| Constructor and Description |
|---|
TestScanLifecycleTwoReaders() |
| Modifier and Type | Method and Description |
|---|---|
void |
testColumnReorderingAB()
SELECT * FROM (a, b) then (b,a). |
void |
testColumnReorderingBA()
SELECT * FROM (b,a) then (a, b). |
void |
testEarlySchemaTypeConflict()
SELECT * from two readers: both (a, b), but with a conflicting
type for the column b.
|
void |
testExpandingSchemaAllowingSchemaChange()
SELECT * FROM two readers, one (a, b), the other (a, b, c).
|
void |
testExpandingSchemaDisallowingSchemaChange()
SELECT * FROM two readers, one (a, b), the other (a, b, c).
|
void |
testLateSchemaTypeConflict()
SELECT * from two readers: both (a, b), but with a conflicting
type for the column b.
|
void |
testModeConflict()
SELECT * from two readers: both (a, b), but with a conflicting
type for the column b.
|
void |
testNullThenValidReader() |
void |
testShrinkingSchema()
SELECT * FROM two readers, one with (a, b), the other with just (a).
|
void |
testShrinkingSchemaWithConflict()
Shrinking schema, as above.
|
void |
testSpecifiedColumnOrder()
SELECT , b FROM (b,a) then (a, b). |
void |
testTwoNullReaders()
Two null readers: neither provides a valid scan schema.
|
void |
testTwoValidReaders() |
void |
testValidThenNullReader() |
buildScan, simpleExpected, verifyEmptyReader, verifyStandardReaderclassSetup, classTeardownescapeJsonString, finishDrillTest, initDrillTestpublic void testTwoNullReaders()
public void testNullThenValidReader()
public void testValidThenNullReader()
public void testTwoValidReaders()
public void testShrinkingSchema()
public void testShrinkingSchemaWithConflict()
SELECT a, b FROM (a) then (a,b)
But choose a missing column type (the default Nullable INT) in the first reader that will conflict with the actual column type (VARCHAR) in the second.
public void testExpandingSchemaAllowingSchemaChange()
public void testExpandingSchemaDisallowingSchemaChange()
We can argue if this behavior is correct. We know most operators, and no ODBC or JDBC client can handle schema change. So, our other options are do the schema change anyway (the above test), fail, or this choice, which is to try to muddle though. The correct solution is to provide a schema (tested elsewhere.)
public void testEarlySchemaTypeConflict()
public void testLateSchemaTypeConflict()
public void testModeConflict()
public void testColumnReorderingAB()
SELECT * FROM (a, b) then (b,a). The order of the first
table drives the order of the results.public void testColumnReorderingBA()
SELECT * FROM (b,a) then (a, b). The order of the first
table drives the order of the results.public void testSpecifiedColumnOrder()
SELECT , b FROM (b,a) then (a, b). The order of the project list
drives the order of the results.Copyright © 2021 The Apache Software Foundation. All rights reserved.