Repository: hive
Updated Branches:
  refs/heads/master c9d1b0e1e -> 90149de71


HIVE-17636: Add multiple_agg.q test for blobstores (Ran Gu, reviewed by Sergio 
Pena)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/90149de7
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/90149de7
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/90149de7

Branch: refs/heads/master
Commit: 90149de71eecb3374fcee0b876324a3b84b8a93d
Parents: c9d1b0e
Author: Ran Gu <guran0...@gmail.com>
Authored: Wed Oct 4 09:41:53 2017 -0500
Committer: Sergio Pena <sergio.p...@cloudera.com>
Committed: Wed Oct 4 09:41:53 2017 -0500

----------------------------------------------------------------------
 data/files/birthdays                            |  9 +++++
 .../test/queries/clientpositive/multiple_agg.q  |  9 +++++
 .../results/clientpositive/multiple_agg.q.out   | 35 ++++++++++++++++++++
 3 files changed, 53 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/90149de7/data/files/birthdays
----------------------------------------------------------------------
diff --git a/data/files/birthdays b/data/files/birthdays
new file mode 100644
index 0000000..75854e5
--- /dev/null
+++ b/data/files/birthdays
@@ -0,0 +1,9 @@
+1,A,2012-10-15 08:01:00
+2,B,2012-10-15 08:02:00
+3,C,2012-10-15 08:03:00
+4,D,2012-10-15 08:04:00
+5,E,2012-10-15 08:05:00
+6,F,2012-10-15 08:06:00
+7,G,2012-10-15 08:07:00
+8,H,2012-10-15 08:08:00
+9,I,2012-10-15 08:09:00

http://git-wip-us.apache.org/repos/asf/hive/blob/90149de7/itests/hive-blobstore/src/test/queries/clientpositive/multiple_agg.q
----------------------------------------------------------------------
diff --git 
a/itests/hive-blobstore/src/test/queries/clientpositive/multiple_agg.q 
b/itests/hive-blobstore/src/test/queries/clientpositive/multiple_agg.q
new file mode 100644
index 0000000..346516f
--- /dev/null
+++ b/itests/hive-blobstore/src/test/queries/clientpositive/multiple_agg.q
@@ -0,0 +1,9 @@
+-- Test multiple aggregate udfs work in the same query
+
+DROP TABLE birthdays;
+CREATE EXTERNAL TABLE birthdays (id INT, name STRING, birthday TIMESTAMP)
+ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+LOCATION '${hiveconf:test.blobstore.path.unique}/multiple_agg/birthdays';
+LOAD DATA LOCAL INPATH '../../data/files/birthdays' INTO TABLE birthdays;
+
+SELECT MIN(Birthday) AS MinBirthday, MAX(Birthday) AS MaxBirthday FROM 
birthdays;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/90149de7/itests/hive-blobstore/src/test/results/clientpositive/multiple_agg.q.out
----------------------------------------------------------------------
diff --git 
a/itests/hive-blobstore/src/test/results/clientpositive/multiple_agg.q.out 
b/itests/hive-blobstore/src/test/results/clientpositive/multiple_agg.q.out
new file mode 100644
index 0000000..90991c9
--- /dev/null
+++ b/itests/hive-blobstore/src/test/results/clientpositive/multiple_agg.q.out
@@ -0,0 +1,35 @@
+PREHOOK: query: DROP TABLE birthdays
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE birthdays
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE EXTERNAL TABLE birthdays (id INT, name STRING, birthday 
TIMESTAMP)
+ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+PREHOOK: Input: ### test.blobstore.path ###/multiple_agg/birthdays
+PREHOOK: Output: database:default
+PREHOOK: Output: default@birthdays
+POSTHOOK: query: CREATE EXTERNAL TABLE birthdays (id INT, name STRING, 
birthday TIMESTAMP)
+ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Input: ### test.blobstore.path ###/multiple_agg/birthdays
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@birthdays
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/birthdays' INTO TABLE 
birthdays
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@birthdays
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/birthdays' INTO 
TABLE birthdays
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@birthdays
+PREHOOK: query: SELECT MIN(Birthday) AS MinBirthday, MAX(Birthday) AS 
MaxBirthday FROM birthdays
+PREHOOK: type: QUERY
+PREHOOK: Input: default@birthdays
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT MIN(Birthday) AS MinBirthday, MAX(Birthday) AS 
MaxBirthday FROM birthdays
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@birthdays
+#### A masked pattern was here ####
+2012-10-15 08:01:00    2012-10-15 08:09:00

Reply via email to