You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2016/10/24 22:58:24 UTC

hive git commit: HIVE-14950 Support integer data type (Zoltan Haindrich via Alan Gates)

Repository: hive
Updated Branches:
  refs/heads/master ad5d81697 -> 080de9708


HIVE-14950 Support integer data type (Zoltan Haindrich via Alan Gates)


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

Branch: refs/heads/master
Commit: 080de9708a3f9b975c2b1374c01293615c697114
Parents: ad5d816
Author: Alan Gates <ga...@hortonworks.com>
Authored: Mon Oct 24 15:57:16 2016 -0700
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Mon Oct 24 15:57:16 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/parse/HiveLexer.g |  2 +-
 .../queries/clientpositive/double_precision.q   |  2 --
 .../queries/clientpositive/primitive_types.q    | 11 ++++++
 .../clientpositive/double_precision.q.out       | 16 ---------
 .../clientpositive/primitive_types.q.out        | 37 ++++++++++++++++++++
 5 files changed, 49 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/080de970/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
index a0ff65d..63c32a8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
@@ -121,7 +121,7 @@ KW_COMMENT: 'COMMENT';
 KW_BOOLEAN: 'BOOLEAN';
 KW_TINYINT: 'TINYINT';
 KW_SMALLINT: 'SMALLINT';
-KW_INT: 'INT';
+KW_INT: 'INT' | 'INTEGER';
 KW_BIGINT: 'BIGINT';
 KW_FLOAT: 'FLOAT';
 KW_DOUBLE: 'DOUBLE';

http://git-wip-us.apache.org/repos/asf/hive/blob/080de970/ql/src/test/queries/clientpositive/double_precision.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/double_precision.q b/ql/src/test/queries/clientpositive/double_precision.q
deleted file mode 100644
index ab7c839..0000000
--- a/ql/src/test/queries/clientpositive/double_precision.q
+++ /dev/null
@@ -1,2 +0,0 @@
-create table dp (a double precision, b double precision);
-describe dp;

http://git-wip-us.apache.org/repos/asf/hive/blob/080de970/ql/src/test/queries/clientpositive/primitive_types.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/primitive_types.q b/ql/src/test/queries/clientpositive/primitive_types.q
new file mode 100644
index 0000000..74729be
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/primitive_types.q
@@ -0,0 +1,11 @@
+create table t (
+	dp double precision,
+	d double,
+	f float,
+	i int,
+	ii integer,
+	si smallint,
+	bi bigint
+	);
+describe t;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/080de970/ql/src/test/results/clientpositive/double_precision.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/double_precision.q.out b/ql/src/test/results/clientpositive/double_precision.q.out
deleted file mode 100644
index 1057278..0000000
--- a/ql/src/test/results/clientpositive/double_precision.q.out
+++ /dev/null
@@ -1,16 +0,0 @@
-PREHOOK: query: create table dp (a double precision, b double precision)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dp
-POSTHOOK: query: create table dp (a double precision, b double precision)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dp
-PREHOOK: query: describe dp
-PREHOOK: type: DESCTABLE
-PREHOOK: Input: default@dp
-POSTHOOK: query: describe dp
-POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: default@dp
-a                   	double              	                    
-b                   	double              	                    

http://git-wip-us.apache.org/repos/asf/hive/blob/080de970/ql/src/test/results/clientpositive/primitive_types.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/primitive_types.q.out b/ql/src/test/results/clientpositive/primitive_types.q.out
new file mode 100644
index 0000000..e3cbbfb
--- /dev/null
+++ b/ql/src/test/results/clientpositive/primitive_types.q.out
@@ -0,0 +1,37 @@
+PREHOOK: query: create table t (
+	dp double precision,
+	d double,
+	f float,
+	i int,
+	ii integer,
+	si smallint,
+	bi bigint
+	)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t
+POSTHOOK: query: create table t (
+	dp double precision,
+	d double,
+	f float,
+	i int,
+	ii integer,
+	si smallint,
+	bi bigint
+	)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t
+PREHOOK: query: describe t
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@t
+POSTHOOK: query: describe t
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@t
+dp                  	double              	                    
+d                   	double              	                    
+f                   	float               	                    
+i                   	int                 	                    
+ii                  	int                 	                    
+si                  	smallint            	                    
+bi                  	bigint