hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject hive git commit: HIVE-17820: Add buckets.q test for blobstores (Ran Wu, reviewed by Sergio Pena)
Date Wed, 01 Nov 2017 15:09:42 GMT
Repository: hive
Updated Branches:
  refs/heads/master c422b5c8d -> c0a8c23da


HIVE-17820: Add buckets.q test for blobstores (Ran Wu, 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/c0a8c23d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/c0a8c23d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/c0a8c23d

Branch: refs/heads/master
Commit: c0a8c23daf40e3ca7ed3632850054a85ff7860ca
Parents: c422b5c
Author: Ran Wu <guran0927@gmail.com>
Authored: Wed Nov 1 10:09:00 2017 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Wed Nov 1 10:09:00 2017 -0500

----------------------------------------------------------------------
 .../src/test/queries/clientpositive/buckets.q   |  31 ++++
 .../test/results/clientpositive/buckets.q.out   | 181 +++++++++++++++++++
 2 files changed, 212 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c0a8c23d/itests/hive-blobstore/src/test/queries/clientpositive/buckets.q
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/queries/clientpositive/buckets.q b/itests/hive-blobstore/src/test/queries/clientpositive/buckets.q
new file mode 100644
index 0000000..ca3c118
--- /dev/null
+++ b/itests/hive-blobstore/src/test/queries/clientpositive/buckets.q
@@ -0,0 +1,31 @@
+-- Test bucketed table
+
+SET hive.exec.dynamic.partition=true;
+SET hive.exec.dynamic.partition.mode=nonstrict;
+
+DROP TABLE IF EXISTS source;
+CREATE TABLE source (a STRING, b STRING, c DOUBLE)
+ROW FORMAT DELIMITED
+FIELDS TERMINATED BY ' '
+COLLECTION ITEMS TERMINATED BY '\t'
+LINES TERMINATED BY '\n'
+LOCATION '${hiveconf:test.blobstore.path.unique}/buckets/source';
+LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt' INTO TABLE source;
+
+DROP TABLE IF EXISTS buckets;
+CREATE TABLE buckets (a STRING, value DOUBLE)
+PARTITIONED BY (b STRING)
+CLUSTERED BY (a) INTO 2 BUCKETS
+LOCATION '${hiveconf:test.blobstore.path.unique}/buckets/buckets';
+
+INSERT OVERWRITE TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source;
+
+SELECT * FROM buckets;
+
+INSERT INTO TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source;
+
+SELECT * FROM buckets;

http://git-wip-us.apache.org/repos/asf/hive/blob/c0a8c23d/itests/hive-blobstore/src/test/results/clientpositive/buckets.q.out
----------------------------------------------------------------------
diff --git a/itests/hive-blobstore/src/test/results/clientpositive/buckets.q.out b/itests/hive-blobstore/src/test/results/clientpositive/buckets.q.out
new file mode 100644
index 0000000..f75187e
--- /dev/null
+++ b/itests/hive-blobstore/src/test/results/clientpositive/buckets.q.out
@@ -0,0 +1,181 @@
+PREHOOK: query: DROP TABLE IF EXISTS source
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS source
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE source (a STRING, b STRING, c DOUBLE)
+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 ###/buckets/source
+PREHOOK: Output: database:default
+PREHOOK: Output: default@source
+POSTHOOK: query: CREATE TABLE source (a STRING, b STRING, c DOUBLE)
+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 ###/buckets/source
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@source
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt' INTO TABLE source
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@source
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/3col_data.txt' INTO TABLE source
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@source
+PREHOOK: query: DROP TABLE IF EXISTS buckets
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE IF EXISTS buckets
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE buckets (a STRING, value DOUBLE)
+PARTITIONED BY (b STRING)
+CLUSTERED BY (a) INTO 2 BUCKETS
+#### A masked pattern was here ####
+PREHOOK: type: CREATETABLE
+PREHOOK: Input: ### test.blobstore.path ###/buckets/buckets
+PREHOOK: Output: database:default
+PREHOOK: Output: default@buckets
+POSTHOOK: query: CREATE TABLE buckets (a STRING, value DOUBLE)
+PARTITIONED BY (b STRING)
+CLUSTERED BY (a) INTO 2 BUCKETS
+#### A masked pattern was here ####
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Input: ### test.blobstore.path ###/buckets/buckets
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@buckets
+PREHOOK: query: INSERT OVERWRITE TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source
+PREHOOK: type: QUERY
+PREHOOK: Input: default@source
+PREHOOK: Output: default@buckets
+POSTHOOK: query: INSERT OVERWRITE TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@source
+POSTHOOK: Output: default@buckets@b=abc
+POSTHOOK: Output: default@buckets@b=ajss
+POSTHOOK: Output: default@buckets@b=data
+POSTHOOK: Output: default@buckets@b=def
+POSTHOOK: Output: default@buckets@b=djns
+POSTHOOK: Output: default@buckets@b=ne
+POSTHOOK: Output: default@buckets@b=random
+POSTHOOK: Lineage: buckets PARTITION(b=abc).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=abc).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ajss).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ajss).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=data).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=data).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=def).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=def).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=djns).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=djns).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ne).a SIMPLE [(source)source.FieldSchema(name:a, type:string,
comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ne).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=random).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=random).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+PREHOOK: query: SELECT * FROM buckets
+PREHOOK: type: QUERY
+PREHOOK: Input: default@buckets
+PREHOOK: Input: default@buckets@b=abc
+PREHOOK: Input: default@buckets@b=ajss
+PREHOOK: Input: default@buckets@b=data
+PREHOOK: Input: default@buckets@b=def
+PREHOOK: Input: default@buckets@b=djns
+PREHOOK: Input: default@buckets@b=ne
+PREHOOK: Input: default@buckets@b=random
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM buckets
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@buckets
+POSTHOOK: Input: default@buckets@b=abc
+POSTHOOK: Input: default@buckets@b=ajss
+POSTHOOK: Input: default@buckets@b=data
+POSTHOOK: Input: default@buckets@b=def
+POSTHOOK: Input: default@buckets@b=djns
+POSTHOOK: Input: default@buckets@b=ne
+POSTHOOK: Input: default@buckets@b=random
+#### A masked pattern was here ####
+1	10.5	abc
+3	90.23232	ajss
+6	3.002	data
+2	11.5	def
+4	89.02002	djns
+7	71.9084	ne
+5	2.99	random
+PREHOOK: query: INSERT INTO TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source
+PREHOOK: type: QUERY
+PREHOOK: Input: default@source
+PREHOOK: Output: default@buckets
+POSTHOOK: query: INSERT INTO TABLE buckets
+PARTITION (b)
+SELECT a, c, b FROM source
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@source
+POSTHOOK: Output: default@buckets@b=abc
+POSTHOOK: Output: default@buckets@b=ajss
+POSTHOOK: Output: default@buckets@b=data
+POSTHOOK: Output: default@buckets@b=def
+POSTHOOK: Output: default@buckets@b=djns
+POSTHOOK: Output: default@buckets@b=ne
+POSTHOOK: Output: default@buckets@b=random
+POSTHOOK: Lineage: buckets PARTITION(b=abc).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=abc).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ajss).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ajss).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=data).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=data).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=def).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=def).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=djns).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=djns).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ne).a SIMPLE [(source)source.FieldSchema(name:a, type:string,
comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=ne).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=random).a SIMPLE [(source)source.FieldSchema(name:a,
type:string, comment:null), ]
+POSTHOOK: Lineage: buckets PARTITION(b=random).value SIMPLE [(source)source.FieldSchema(name:c,
type:double, comment:null), ]
+PREHOOK: query: SELECT * FROM buckets
+PREHOOK: type: QUERY
+PREHOOK: Input: default@buckets
+PREHOOK: Input: default@buckets@b=abc
+PREHOOK: Input: default@buckets@b=ajss
+PREHOOK: Input: default@buckets@b=data
+PREHOOK: Input: default@buckets@b=def
+PREHOOK: Input: default@buckets@b=djns
+PREHOOK: Input: default@buckets@b=ne
+PREHOOK: Input: default@buckets@b=random
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM buckets
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@buckets
+POSTHOOK: Input: default@buckets@b=abc
+POSTHOOK: Input: default@buckets@b=ajss
+POSTHOOK: Input: default@buckets@b=data
+POSTHOOK: Input: default@buckets@b=def
+POSTHOOK: Input: default@buckets@b=djns
+POSTHOOK: Input: default@buckets@b=ne
+POSTHOOK: Input: default@buckets@b=random
+#### A masked pattern was here ####
+1	10.5	abc
+1	10.5	abc
+3	90.23232	ajss
+3	90.23232	ajss
+6	3.002	data
+6	3.002	data
+2	11.5	def
+2	11.5	def
+4	89.02002	djns
+4	89.02002	djns
+7	71.9084	ne
+7	71.9084	ne
+5	2.99	random
+5	2.99	random


Mime
View raw message