client = new DrillClient(config, serviceSet.getCoordinator());
client.setSupportComplexTypes(false);
client.connect();
results = testSqlWithResults("select * from dfs_test.`[WORKING_PATH]/src/test/resources/store/text/data/regions.csv`");
loader.load(results.get(0).getHeader().getDef(), results.get(0).getData());
RecordBatchDef def = results.get(0).getHeader().getDef();
// the entire row is returned as a single column
assertEquals(1, def.getFieldCount());
// with setSupportComplexTypes == false, the column mode should be REQUIRED
assertTrue(def.getField(0).getMajorType().getMode() == DataMode.REQUIRED);
loader.clear();
for(QueryResultBatch result : results) {
result.release();
}
client.close();
client = new DrillClient(config, serviceSet.getCoordinator());
client.setSupportComplexTypes(true);
client.connect();
results = testSqlWithResults("select * from dfs_test.`[WORKING_PATH]/src/test/resources/store/text/data/regions.csv`");
loader.load(results.get(0).getHeader().getDef(), results.get(0).getData());
def = results.get(0).getHeader().getDef();
// the entire row is returned as a single column
assertEquals(1, def.getFieldCount());
// with setSupportComplexTypes == true, the column mode should be REPEATED
assertTrue(def.getField(0).getMajorType().getMode() == DataMode.REPEATED);
loader.clear();
for(QueryResultBatch result : results) {
result.release();
}
client.close();