public class TestScanOrchestratorEarlySchema extends SubOperatorTest
The tests here focus on the scan orchestrator itself; the tests assume that tests for lower-level components have already passed.
DrillTest.MemWatcherdirTestWatcher, fixturelogOutcome, objectMapper, REPEAT_RULE, thrownException, TIMEOUT| Constructor and Description |
|---|
TestScanOrchestratorEarlySchema() |
| Modifier and Type | Method and Description |
|---|---|
void |
testColumnReordering()
Verify that different table column orders are projected into the
SELECT order, preserving vectors, so no schema change for column
reordering.
|
void |
testEarlySchemaSelectAll()
Test SELECT a, b FROM table(a, b)
|
void |
testEarlySchemaSelectAllReorder()
Test SELECT b, a FROM table(a, b)
|
void |
testEarlySchemaSelectExtra()
Test SELECT a, b, c FROM table(a, b)
c will be null
|
void |
testEarlySchemaSelectExtraCustomType()
Test SELECT a, b, c FROM table(a, b)
c will be null of type VARCHAR
|
void |
testEarlySchemaSelectNone()
Test SELECT - FROM table(a, b)
|
void |
testEarlySchemaSelectSubset()
Test SELECT a FROM table(a, b)
|
void |
testEarlySchemaWildcard()
Test SELECT * from an early-schema table of (a, b)
|
void |
testEmptySchema()
Test SELECT * from an early-schema table of () (that is,
a schema that consists of zero columns.
|
void |
testEmptySchemaExtra()
Test SELECT a from an early-schema table of () (that is,
a schema that consists of zero columns.
|
void |
testModeSmoothing() |
void |
testTypeSmoothing()
Test the ability of the scan scanner to "smooth" out schema changes
by reusing the type from a previous reader, if known.
|
void |
testTypeSmoothingExplicit()
The projection mechanism provides "type smoothing": null
columns prefer the type of previously-seen non-null columns.
|
classSetup, classTeardownescapeJsonString, finishDrillTest, initDrillTestpublic void testEarlySchemaWildcard()
public void testEarlySchemaSelectAll()
public void testEarlySchemaSelectAllReorder()
public void testEarlySchemaSelectExtra()
public void testEarlySchemaSelectExtraCustomType()
public void testEarlySchemaSelectSubset()
public void testEarlySchemaSelectNone()
public void testEmptySchema()
public void testEmptySchemaExtra()
public void testTypeSmoothingExplicit()
SELECT a, b ...
Table 1: (a: BIGINT, b: VARCHAR)
Table 2: (a: BIGINT)
Table 3: (b: VARCHAR)
The result in all cases should be
(a : BIGINT, b: VARCHAR)public void testTypeSmoothing()
Detailed testing of type matching for "missing" columns is done
in #testNullColumnLoader().
As a side effect, makes sure that two identical tables (in this case, separated by a different table) results in no schema change.
public void testModeSmoothing()
public void testColumnReordering()
Copyright © 2021 The Apache Software Foundation. All rights reserved.