IMPALA-4153: Fix count(*) on all blank('') columns - test
This change adds test coverage for the fixes committed for
IMPALA-2399 in commit 9ed3b685a109559fad8dd94f6c03af93e164305a.
It uses the table nulltable in the workload functional-query
to verify the materialization and counting of NULL and empty-
valued columns. The test can be run on any supported storage
and compression combination.
Change-Id: I23923f95f43d67977ee1520a1fc09ce297548b3f
Reviewed-on: http://gerrit.cloudera.org:8080/4755
Tested-by: Internal Jenkins
Reviewed-by: Jim Apple <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/9af59bfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/9af59bfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/9af59bfe
Branch: refs/heads/master
Commit: 9af59bfe2bb2747e71de45cb1fb96b7da3811ad1
Parents: f397d75
Author: Laszlo Gaal <[email protected]>
Authored: Wed Oct 19 11:10:34 2016 +0200
Committer: Alex Behm <[email protected]>
Committed: Thu Nov 3 23:08:56 2016 +0000
----------------------------------------------------------------------
.../queries/QueryTest/scanners.test | 26 ++++++++++++++++++++
1 file changed, 26 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/9af59bfe/testdata/workloads/functional-query/queries/QueryTest/scanners.test
----------------------------------------------------------------------
diff --git
a/testdata/workloads/functional-query/queries/QueryTest/scanners.test
b/testdata/workloads/functional-query/queries/QueryTest/scanners.test
index b8d1343..658e4cf 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/scanners.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/scanners.test
@@ -48,3 +48,29 @@ limit 10
---- TYPES
INT, BOOLEAN, INT
====
+---- QUERY
+# The next sequence of queries is a regression test for IMPALA-4153
+# verifying the retrieval of empty and NULL string columns
+select count(*)
+from nulltable
+---- RESULTS
+1
+---- TYPES
+BIGINT
+====
+---- QUERY
+select count(*)
+from nulltable where b = ''
+---- RESULTS
+1
+---- TYPES
+BIGINT
+====
+---- QUERY
+select a,b
+from nulltable where b = ''
+---- RESULTS
+'a',''
+---- TYPES
+STRING, STRING
+====