From dev-return-34797-archive-asf-public=cust-asf.ponee.io@drill.apache.org Tue Jan 9 22:26:20 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id EBBEF18072F for ; Tue, 9 Jan 2018 22:26:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DBF31160C2D; Tue, 9 Jan 2018 21:26:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 25630160C17 for ; Tue, 9 Jan 2018 22:26:18 +0100 (CET) Received: (qmail 16000 invoked by uid 500); 9 Jan 2018 21:26:16 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 15517 invoked by uid 99); 9 Jan 2018 21:26:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2018 21:26:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1C86DE0779; Tue, 9 Jan 2018 21:26:15 +0000 (UTC) From: arina-ielchiieva To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #1083: DRILL-4185: UNION ALL involving empty directory on... Content-Type: text/plain Message-Id: <20180109212615.1C86DE0779@git1-us-west.apache.org> Date: Tue, 9 Jan 2018 21:26:15 +0000 (UTC) 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> 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 ---