Index: bin/ext/rcfilecat.sh =================================================================== --- bin/ext/rcfilecat.sh (revision 946374) +++ bin/ext/rcfilecat.sh (working copy) @@ -3,6 +3,7 @@ rcfilecat () { CLASS=org.apache.hadoop.hive.cli.RCFileCat + HIVE_OPTS ='' execHiveCmd $CLASS "$@" } Index: cli/src/java/org/apache/hadoop/hive/cli/RCFileCat.java =================================================================== --- cli/src/java/org/apache/hadoop/hive/cli/RCFileCat.java (revision 946374) +++ cli/src/java/org/apache/hadoop/hive/cli/RCFileCat.java (working copy) @@ -34,6 +34,9 @@ public class RCFileCat implements Tool{ Configuration conf = null; + + private static String TAB ="\t"; + private static String NEWLINE ="\r\n"; @Override public int run(String[] args) throws Exception { @@ -82,7 +85,12 @@ BytesRefWritable v = value.get(i); txt.set(v.getData(), v.getStart(), v.getLength()); System.out.print(txt.toString()); + if (i < value.size() - 1) { + // do not put the TAB for the last column + System.out.print(RCFileCat.TAB); + } } + System.out.print(RCFileCat.NEWLINE); } return 0; }