diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java index 95296c0..20535bc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/PTFInputDef.java @@ -19,9 +19,9 @@ package org.apache.hadoop.hive.ql.plan.ptf; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hive.ql.exec.RowSchema; import org.apache.hadoop.hive.ql.plan.Explain; -import org.apache.hadoop.util.StringUtils; public abstract class PTFInputDef { private String expressionTreeString; @@ -43,7 +43,7 @@ public ShapeDetails getOutputShape() { @Explain(displayName = "output shape") public String getOutputShapeExplain() { RowSchema schema = outputShape.getRr().getRowSchema(); - return StringUtils.join(", ", schema.getSignature()); + return StringUtils.join(schema.getSignature(), ", "); } public void setOutputShape(ShapeDetails outputShape) { diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java index 730823f..ca59e90 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java @@ -59,6 +59,7 @@ import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; +import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.mapred.TextInputFormat; import org.apache.hadoop.util.Shell; @@ -93,7 +94,8 @@ tmppath = new Path(tmpdir); fs = FileSystem.get(conf); - if (fs.exists(tmppath) && !fs.getFileStatus(tmppath).isDirectory()) { + if (fs.exists(tmppath) && + !ShimLoader.getHadoopShims().isDirectory(fs.getFileStatus(tmppath))) { throw new RuntimeException(tmpdir + " exists but is not a directory"); } @@ -166,7 +168,7 @@ private static void fileDiff(String datafile, String testdir) throws Exception { if (!fs.exists(di_test)) { throw new RuntimeException(tmpdir + File.separator + testdir + " does not exist"); } - if (!fs.getFileStatus(di_test).isDirectory()) { + if (!ShimLoader.getHadoopShims().isDirectory(fs.getFileStatus(di_test))) { throw new RuntimeException(tmpdir + File.separator + testdir + " is not a directory"); } FSDataInputStream fi_test = fs.open((fs.listStatus(di_test))[0].getPath());