Github user arina-ielchiieva commented on a diff in the pull request: https://github.com/apache/drill/pull/1083#discussion_r160525739 --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/TestEmptyInputSql.java --- @@ -177,4 +177,33 @@ public void testQueryEmptyCsv() throws Exception { .run(); } + @Test + public void testEmptyDirectory() throws Exception { + final BatchSchema expectedSchema = new SchemaBuilder().build(); + + testBuilder() + .sqlQuery("select * from dfs.`%s`", EMPTY_DIR_NAME) + .schemaBaseLine(expectedSchema) + .build() + .run(); + } + + @Test + public void testEmptyDirectoryAndFieldInQuery() throws Exception { + final List<Pair<SchemaPath, TypeProtos.MajorType>> expectedSchema = Lists.newArrayList(); + final TypeProtos.MajorType majorType = TypeProtos.MajorType.newBuilder() + .setMinorType(TypeProtos.MinorType.INT) // field "key" is absent in schema-less table --- End diff -- schema-less -> schemaless
---