public class TestPartitionRace extends BaseCsvTest
Depending on which file is read first, the output row may start with or without the partition column. Once the column occurs, it will persist.
The solution is to figure out the max partition depth in the EasySubScan rather than in each scan operator, which is done in the current "V3" version. The tests here verify this behavior.
DrillTest.MemWatcherBIG_COL_SIZE, EMPTY_FILE, FILE_N_NAME, NESTED_DIR, NESTED_FILE, PART_DIR, ROOT_FILE, SCHEMA_BATCH_ENABLED, secondFile, testDir, validHeadersclient, cluster, dirTestWatcherlogOutcome, objectMapper, REPEAT_RULE, thrownException, TIMEOUT| Constructor and Description |
|---|
TestPartitionRace() |
| Modifier and Type | Method and Description |
|---|---|
static void |
setup() |
void |
testNoRace()
V3 computes partition depth in the group scan (which sees all files), and
so the partition column count does not vary across scans.
|
void |
testSingleScan()
Oddly, when run in a single fragment, the files occur in a
stable order, the partition always appears, and it appears in
the first column position.
|
buildBigColFile, buildFile, buildFile, buildNestedTable, buildTable, enableMultiScan, enableSchema, enableSchemaSupport, resetMultiScan, resetSchema, resetSchemaSupport, setup, setupgetFile, queryBuilder, run, runAndLog, runAndPrint, runAndPrint, shutdown, startCluster, testBuilderescapeJsonString, finishDrillTest, initDrillTestpublic void testSingleScan()
throws IOException
IOExceptionpublic void testNoRace()
throws IOException
IOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.