hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject svn commit: r1584944 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
Date Sat, 05 Apr 2014 00:04:27 GMT
Author: jdere
Date: Sat Apr  5 00:04:26 2014
New Revision: 1584944

URL: http://svn.apache.org/r1584944
Log:
HIVE-6811: LOAD command does not work with relative paths on Windows (Jason Dere, reviewed
by Xuefu Zhang)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java?rev=1584944&r1=1584943&r2=1584944&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java Sat Apr
 5 00:04:26 2014
@@ -19,6 +19,8 @@
 package org.apache.hadoop.hive.ql.parse;
 
 import org.antlr.runtime.tree.Tree;
+import org.apache.commons.httpclient.URIException;
+import org.apache.commons.httpclient.util.URIUtil;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -95,7 +97,8 @@ public class LoadSemanticAnalyzer extend
     // directory
     if (!path.startsWith("/")) {
       if (isLocal) {
-        path = new Path(System.getProperty("user.dir"), fromPath).toString();
+        path = URIUtil.decode(
+            new Path(System.getProperty("user.dir"), fromPath).toUri().toString());
       } else {
         path = new Path(new Path("/user/" + System.getProperty("user.name")),
           path).toString();



Mime
View raw message