hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1597015 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
Date Fri, 23 May 2014 06:18:35 GMT
Author: hashutosh
Date: Fri May 23 06:18:35 2014
New Revision: 1597015

URL: http://svn.apache.org/r1597015
Log:
HIVE-6986 : MatchPath fails with small resultExprString (Furcy Pin via Ashutosh Chauhan)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java?rev=1597015&r1=1597014&r2=1597015&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/MatchPath.java Fri May 23 06:18:35
2014
@@ -756,8 +756,7 @@ public class MatchPath extends TableFunc
     private void fixResultExprString()
     {
       String r = resultExprString.trim();
-      String prefix = r.substring(0, 6);
-      if (!prefix.toLowerCase().equals("select"))
+      if (r.length()<6 || !r.substring(0, 6).toLowerCase().equals("select"))
       {
         r = "select " + r;
       }



Mime
View raw message