Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (revision 1615021) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (working copy) @@ -5958,10 +5958,12 @@ // The output files of a FileSink can be merged if they are either not being written to a table // or are being written to a table which is either not bucketed or enforce bucketing is not set // and table the table is either not sorted or enforce sorting is not set - boolean canBeMerged = (dest_tab == null || !((dest_tab.getNumBuckets() > 0 && + // If hive.hadoop.supports.splittable.combineinputformat=false, the output files cannot be merged. + boolean canBeMerged = ((dest_tab == null || !((dest_tab.getNumBuckets() > 0 && conf.getBoolVar(HiveConf.ConfVars.HIVEENFORCEBUCKETING)) || (dest_tab.getSortCols() != null && dest_tab.getSortCols().size() > 0 && - conf.getBoolVar(HiveConf.ConfVars.HIVEENFORCESORTING)))); + conf.getBoolVar(HiveConf.ConfVars.HIVEENFORCESORTING)))) && + conf.getBoolVar(HiveConf.ConfVars.HIVE_COMBINE_INPUT_FORMAT_SUPPORTS_SPLITTABLE)); FileSinkDesc fileSinkDesc = new FileSinkDesc( queryTmpdir,