hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [13/31] hive git commit: HIVE-17430: Add LOAD DATA test for blobstores (Yuzhou Sun, reviewed by Sergio Pena)
Date Fri, 15 Sep 2017 19:52:14 GMT
HIVE-17430: Add LOAD DATA test for blobstores (Yuzhou Sun, 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/ea9ebe44
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ea9ebe44
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ea9ebe44

Branch: refs/heads/hive-14535
Commit: ea9ebe44f5e9138d18cd1960ac3bd1972aef31c1
Parents: 309e891
Author: Yuzhou Sun <yuzhosun@amazon.com>
Authored: Wed Sep 13 09:54:34 2017 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Wed Sep 13 09:54:34 2017 -0500

----------------------------------------------------------------------
 .../src/test/queries/clientpositive/load_data.q | 20 +++++++
 .../test/results/clientpositive/load_data.q.out | 59 ++++++++++++++++++++
 2 files changed, 79 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ea9ebe44/itests/hive-blobstore/src/test/queries/clientpositive/load_data.q
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/queries/clientpositive/load_data.q b/itests/hive-blobstore/src/test/queries/clientpositive/load_data.q
new file mode 100644
index 0000000..1131e0c
--- /dev/null
+++ b/itests/hive-blobstore/src/test/queries/clientpositive/load_data.q
@@ -0,0 +1,20 @@
+-- Test LOAD DATA command
+
+DROP TABLE load_data_table;
+CREATE TABLE load_data_table(
+    a INT,
+    b STRING,
+    value DOUBLE)
+PARTITIONED BY (
+    dateint STRING,
+    hour STRING)
+ROW FORMAT DELIMITED
+FIELDS TERMINATED BY ' '
+COLLECTION ITEMS TERMINATED BY '\t'
+LINES TERMINATED BY '\n'
+LOCATION '${hiveconf:test.blobstore.path.unique}/load_data/load_data_table';
+
+LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt'
+INTO TABLE load_data_table PARTITION (dateint="aaa", hour="bbb");
+
+SELECT * FROM load_data_table LIMIT 2;

http://git-wip-us.apache.org/repos/asf/hive/blob/ea9ebe44/itests/hive-blobstore/src/test/results/clientpositive/load_data.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/load_data.q.out b/itests/hive-blobstore/src/test/results/clientpositive/load_data.q.out
new file mode 100644
index 0000000..6250c78
--- /dev/null
+++ b/itests/hive-blobstore/src/test/results/clientpositive/load_data.q.out
@@ -0,0 +1,59 @@
+PREHOOK: query: DROP TABLE load_data_table
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE load_data_table
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE load_data_table(
+    a INT,
+    b STRING,
+    value DOUBLE)
+PARTITIONED BY (
+    dateint STRING,
+    hour STRING)
+ROW FORMAT DELIMITED
+FIELDS TERMINATED BY ' '
+COLLECTION ITEMS TERMINATED BY '\t'
+LINES TERMINATED BY '\n'
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+PREHOOK: Input: ### test.blobstore.path ###/load_data/load_data_table
+PREHOOK: Output: database:default
+PREHOOK: Output: default@load_data_table
+POSTHOOK: query: CREATE TABLE load_data_table(
+    a INT,
+    b STRING,
+    value DOUBLE)
+PARTITIONED BY (
+    dateint STRING,
+    hour STRING)
+ROW FORMAT DELIMITED
+FIELDS TERMINATED BY ' '
+COLLECTION ITEMS TERMINATED BY '\t'
+LINES TERMINATED BY '\n'
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Input: ### test.blobstore.path ###/load_data/load_data_table
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@load_data_table
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt'
+INTO TABLE load_data_table PARTITION (dateint="aaa", hour="bbb")
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@load_data_table
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt'
+INTO TABLE load_data_table PARTITION (dateint="aaa", hour="bbb")
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@load_data_table
+POSTHOOK: Output: default@load_data_table@dateint=aaa/hour=bbb
+PREHOOK: query: SELECT * FROM load_data_table LIMIT 2
+PREHOOK: type: QUERY
+PREHOOK: Input: default@load_data_table
+PREHOOK: Input: default@load_data_table@dateint=aaa/hour=bbb
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM load_data_table LIMIT 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@load_data_table
+POSTHOOK: Input: default@load_data_table@dateint=aaa/hour=bbb
+#### A masked pattern was here ####
+1	abc	10.5	aaa	bbb
+2	def	11.5	aaa	bbb


Mime
View raw message