diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java index 6c354d3..fa78b68 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java @@ -778,9 +778,13 @@ private static void configureJobPropertiesForStorageHandler(boolean input, // for native tables, leave it null to avoid cluttering up // plans. if (!jobProperties.isEmpty()) { - if (tableDesc.getOutputFileFormatClass().getName() == HivePassThroughOutputFormat.HIVE_PASSTHROUGH_OF_CLASSNAME) { + if ((!input) && + (tableDesc.getOutputFileFormatClass().getName() + == HivePassThroughOutputFormat.HIVE_PASSTHROUGH_OF_CLASSNAME)) { // get the real output format when we register this for the table - jobProperties.put(HivePassThroughOutputFormat.HIVE_PASSTHROUGH_STORAGEHANDLER_OF_JOBCONFKEY,HiveFileFormatUtils.getRealOutputFormatClassName()); + jobProperties.put( + HivePassThroughOutputFormat.HIVE_PASSTHROUGH_STORAGEHANDLER_OF_JOBCONFKEY, + HiveFileFormatUtils.getRealOutputFormatClassName()); } tableDesc.setJobProperties(jobProperties); }