You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/05/29 06:47:58 UTC

[79/84] [abbrv] hive git commit: HIVE-10787 : MatchPath misses the last matched row from the final result set (Mohammad Kamrul Islam via Ashutosh Chauhan)

HIVE-10787 : MatchPath misses the last matched row from the final result set (Mohammad Kamrul Islam via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/spark
Commit: db09c93372f6b82a13eb427a4dd0c6ab4f947b24
Parents: f9c26cb
Author: Mohammad Kamrul Islam <mi...@yahoo.com>
Authored: Thu May 21 09:49:18 2015 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Thu May 28 13:41:11 2015 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/db09c933/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
index 03f434f..cc2b77b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
@@ -495,7 +495,10 @@ public class MatchPath extends TableFunctionEvaluator
         rowResult = symbolFn.match(row, pItr);
       }
 
-      result.nextRow = pItr.getIndex() - 1;
+      result.nextRow = pItr.getIndex();
+      if(pItr.hasNext()) {
+        result.nextRow -= 1;
+      }
       return result;
     }