Index: ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java @@ -470,6 +470,8 @@ Path fpath = new Path(HiveConf.getVar(hconf, HiveConf.ConfVars.HADOOPMAPFILENAME)); + boolean schemeless = fpath.toUri().getScheme() == null; + ArrayList> children = new ArrayList>(); opCtxMap = new HashMap(); @@ -481,6 +483,9 @@ for (String onefile : conf.getPathToAliases().keySet()) { MapOpCtx opCtx = initObjectInspector(conf, hconf, onefile, convertedOI); Path onepath = new Path(onefile); + if (schemeless) { + onepath = new Path(onepath.toUri().getPath()); + } List aliases = conf.getPathToAliases().get(onefile); for (String onealias : aliases) { @@ -747,4 +752,9 @@ return null; } + public static void main(String[] args) { + Path path = new Path("hdfs://qa14:9000/user/hive/warehouse/data_type"); + Path path2 = new Path("/user/hive/warehouse/data_type/000000_0"); + System.err.println("[MapOperator/main] " + path.toUri().relativize(path2.toUri())); + } }