Repository: hive Updated Branches: refs/heads/master f572ce6d2 -> d2e870438
HIVE-16831: Add unit tests for NPE fixes in HIVE-12054 (Sunitha Beeram, reviewed by Carl Steinbach) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d2e87043 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d2e87043 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d2e87043 Branch: refs/heads/master Commit: d2e870438a99fe84369154d6f399f7864a36319a Parents: f572ce6 Author: Carl Steinbach <c...@apache.org> Authored: Tue Jun 13 17:12:13 2017 -0700 Committer: Carl Steinbach <c...@apache.org> Committed: Tue Jun 13 17:12:13 2017 -0700 ---------------------------------------------------------------------- .../queries/clientpositive/orc_empty_table.q | 11 ++++ .../clientpositive/orc_empty_table.q.out | 68 ++++++++++++++++++++ 2 files changed, 79 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/d2e87043/ql/src/test/queries/clientpositive/orc_empty_table.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientpositive/orc_empty_table.q b/ql/src/test/queries/clientpositive/orc_empty_table.q new file mode 100644 index 0000000..05bba28 --- /dev/null +++ b/ql/src/test/queries/clientpositive/orc_empty_table.q @@ -0,0 +1,11 @@ +CREATE TABLE test_orc_empty_table_with_struct (struct_field STRUCT<int_field: INT>) STORED AS ORC; +SELECT count(*) FROM test_orc_empty_table_with_struct; + +CREATE TABLE test_orc_empty_table_with_map (map_field MAP<STRING,STRING>) STORED AS ORC; +SELECT count(*) FROM test_orc_empty_table_with_map; + +CREATE TABLE test_orc_empty_table_with_list (list_field ARRAY<INT>) STORED AS ORC; +SELECT count(*) FROM test_orc_empty_table_with_list; + +CREATE TABLE test_orc_empty_table_with_union (union_field UNIONTYPE<int, double>) STORED AS ORC; +SELECT count(*) FROM test_orc_empty_table_with_union; http://git-wip-us.apache.org/repos/asf/hive/blob/d2e87043/ql/src/test/results/clientpositive/orc_empty_table.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/orc_empty_table.q.out b/ql/src/test/results/clientpositive/orc_empty_table.q.out new file mode 100644 index 0000000..e95589e --- /dev/null +++ b/ql/src/test/results/clientpositive/orc_empty_table.q.out @@ -0,0 +1,68 @@ +PREHOOK: query: CREATE TABLE test_orc_empty_table_with_struct (struct_field STRUCT<int_field: INT>) STORED AS ORC +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@test_orc_empty_table_with_struct +POSTHOOK: query: CREATE TABLE test_orc_empty_table_with_struct (struct_field STRUCT<int_field: INT>) STORED AS ORC +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@test_orc_empty_table_with_struct +PREHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_struct +PREHOOK: type: QUERY +PREHOOK: Input: default@test_orc_empty_table_with_struct +#### A masked pattern was here #### +POSTHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_struct +POSTHOOK: type: QUERY +POSTHOOK: Input: default@test_orc_empty_table_with_struct +#### A masked pattern was here #### +0 +PREHOOK: query: CREATE TABLE test_orc_empty_table_with_map (map_field MAP<STRING,STRING>) STORED AS ORC +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@test_orc_empty_table_with_map +POSTHOOK: query: CREATE TABLE test_orc_empty_table_with_map (map_field MAP<STRING,STRING>) STORED AS ORC +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@test_orc_empty_table_with_map +PREHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_map +PREHOOK: type: QUERY +PREHOOK: Input: default@test_orc_empty_table_with_map +#### A masked pattern was here #### +POSTHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_map +POSTHOOK: type: QUERY +POSTHOOK: Input: default@test_orc_empty_table_with_map +#### A masked pattern was here #### +0 +PREHOOK: query: CREATE TABLE test_orc_empty_table_with_list (list_field ARRAY<INT>) STORED AS ORC +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@test_orc_empty_table_with_list +POSTHOOK: query: CREATE TABLE test_orc_empty_table_with_list (list_field ARRAY<INT>) STORED AS ORC +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@test_orc_empty_table_with_list +PREHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_list +PREHOOK: type: QUERY +PREHOOK: Input: default@test_orc_empty_table_with_list +#### A masked pattern was here #### +POSTHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_list +POSTHOOK: type: QUERY +POSTHOOK: Input: default@test_orc_empty_table_with_list +#### A masked pattern was here #### +0 +PREHOOK: query: CREATE TABLE test_orc_empty_table_with_union (union_field UNIONTYPE<int, double>) STORED AS ORC +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@test_orc_empty_table_with_union +POSTHOOK: query: CREATE TABLE test_orc_empty_table_with_union (union_field UNIONTYPE<int, double>) STORED AS ORC +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@test_orc_empty_table_with_union +PREHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_union +PREHOOK: type: QUERY +PREHOOK: Input: default@test_orc_empty_table_with_union +#### A masked pattern was here #### +POSTHOOK: query: SELECT count(*) FROM test_orc_empty_table_with_union +POSTHOOK: type: QUERY +POSTHOOK: Input: default@test_orc_empty_table_with_union +#### A masked pattern was here #### +0