hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From heyongqi...@apache.org
Subject svn commit: r907844 - in /hadoop/hive/branches/branch-0.5: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
Date Mon, 08 Feb 2010 23:22:57 GMT
Author: heyongqiang
Date: Mon Feb  8 23:22:56 2010
New Revision: 907844

URL: http://svn.apache.org/viewvc?rev=907844&view=rev
Log:
HIVE-1141. Remove recursive call in FetchOperator.getNextRow. (Zheng Shao via He Yongqiang)

Modified:
    hadoop/hive/branches/branch-0.5/CHANGES.txt
    hadoop/hive/branches/branch-0.5/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java

Modified: hadoop/hive/branches/branch-0.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.5/CHANGES.txt?rev=907844&r1=907843&r2=907844&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.5/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.5/CHANGES.txt Mon Feb  8 23:22:56 2010
@@ -469,6 +469,9 @@
     HIVE-898. Hive ODBC build fails on OSX.
     (Carl Steinbach and Ning Zhang via zshao)
 
+    HIVE-1141. Remove recursive call in FetchOperator.getNextRow.
+    (Zheng Shao via He Yongqiang)
+
 Release 0.4.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/branches/branch-0.5/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.5/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java?rev=907844&r1=907843&r2=907844&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.5/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
(original)
+++ hadoop/hive/branches/branch-0.5/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
Mon Feb  8 23:22:56 2010
@@ -245,29 +245,27 @@
    **/
   public InspectableObject getNextRow() throws IOException {
     try {
-      if (currRecReader == null) {
-        currRecReader = getRecordReader();
-        if (currRecReader == null)
-          return null;
-      }
-
-      boolean ret = currRecReader.next(key, value);
-      if (ret) {
-        if (tblDataDone) {
-          Object obj = serde.deserialize(value);
-          return new InspectableObject(obj, serde.getObjectInspector());
+      while (true) {
+        if (currRecReader == null) {
+          currRecReader = getRecordReader();
+          if (currRecReader == null) {
+            return null;
+          }
+        }
+  
+        boolean ret = currRecReader.next(key, value);
+        if (ret) {
+          if (tblDataDone) {
+            Object obj = serde.deserialize(value);
+            return new InspectableObject(obj, serde.getObjectInspector());
+          } else {
+            rowWithPart[0] = serde.deserialize(value);
+            return new InspectableObject(rowWithPart, rowObjectInspector);
+          }
         } else {
-          rowWithPart[0] = serde.deserialize(value);
-          return new InspectableObject(rowWithPart, rowObjectInspector);
+          currRecReader.close();
+          currRecReader = null;
         }
-      } else {
-        currRecReader.close();
-        currRecReader = null;
-        currRecReader = getRecordReader();
-        if (currRecReader == null)
-          return null;
-        else
-          return getNextRow();
       }
     } catch (Exception e) {
       throw new IOException(e);



Mime
View raw message