hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject [3/3] hive git commit: HIVE-10451 : PTF deserializer fails if values are not used in reducer (Ashutosh Chauhan via Gopal V)
Date Mon, 27 Apr 2015 20:54:59 GMT
HIVE-10451 :  PTF deserializer fails if values are not used in reducer (Ashutosh Chauhan via
Gopal V)


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

Branch: refs/heads/branch-1.2
Commit: 71c7785350fc13a56e3f8426e966bf146ca84ff2
Parents: a58fa6d
Author: Ashutosh Chauhan <hashutosh@apache.org>
Authored: Sun Apr 26 13:17:37 2015 -0700
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Mon Apr 27 13:52:36 2015 -0700

----------------------------------------------------------------------
 ql/src/test/queries/clientpositive/windowing_navfn.q      |  4 +++-
 ql/src/test/results/clientpositive/windowing_navfn.q.out  | 10 ++++++++++
 .../apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java |  5 ++++-
 3 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/71c77853/ql/src/test/queries/clientpositive/windowing_navfn.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/windowing_navfn.q b/ql/src/test/queries/clientpositive/windowing_navfn.q
index e275975..78eb29b 100644
--- a/ql/src/test/queries/clientpositive/windowing_navfn.q
+++ b/ql/src/test/queries/clientpositive/windowing_navfn.q
@@ -17,6 +17,8 @@ create table over10k(
 
 load data local inpath '../../data/files/over10k' into table over10k;
 
+select row_number() over()  from src where key = '238';
+
 select s, row_number() over (partition by d order by dec) from over10k limit 100;
 
 select i, lead(s) over (partition by bin order by d,i desc) from over10k limit 100;
@@ -71,4 +73,4 @@ last_value(b) over (partition by a order by b desc  rows between 1 preceding
and
 last_value(b, true) over (partition by a order by b desc rows between 1 preceding and 1 following
) ,
 last_value(b) over (partition by a order by b desc rows between unbounded preceding and 1
following ) ,
 last_value(b, true) over (partition by a order by b desc rows between unbounded preceding
and 1 following ) 
-from wtest;
\ No newline at end of file
+from wtest;

http://git-wip-us.apache.org/repos/asf/hive/blob/71c77853/ql/src/test/results/clientpositive/windowing_navfn.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/windowing_navfn.q.out b/ql/src/test/results/clientpositive/windowing_navfn.q.out
index 531ab6b..ae7d95a 100644
--- a/ql/src/test/results/clientpositive/windowing_navfn.q.out
+++ b/ql/src/test/results/clientpositive/windowing_navfn.q.out
@@ -44,6 +44,16 @@ POSTHOOK: query: load data local inpath '../../data/files/over10k' into
table ov
 POSTHOOK: type: LOAD
 #### A masked pattern was here ####
 POSTHOOK: Output: default@over10k
+PREHOOK: query: select row_number() over()  from src where key = '238'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+#### A masked pattern was here ####
+POSTHOOK: query: select row_number() over()  from src where key = '238'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+1
+2
 PREHOOK: query: select s, row_number() over (partition by d order by dec) from over10k limit
100
 PREHOOK: type: QUERY
 PREHOOK: Input: default@over10k

http://git-wip-us.apache.org/repos/asf/hive/blob/71c77853/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java b/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
index 89a2eca..4bef6c0 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java
@@ -475,7 +475,10 @@ public final class TypeInfoUtils {
               break;
             }
           }
-          Token name = expect("name");
+          Token name = expect("name",">");
+          if (name.text.equals(">")) {
+            break;
+          }
           fieldNames.add(name.text);
           expect(":");
           fieldTypeInfos.add(parseType());


Mime
View raw message