diff --git ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java index 6a1dc729f3..903f16c419 100755 --- ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java @@ -468,6 +468,24 @@ private void addSplitsForGroup(List dirs, TableScanOperator tableScan, Job try { Utilities.copyTablePropertiesToConf(table, conf); + if(tableScan != null) { + AcidUtils.setTransactionalTableScan(conf, tableScan.getConf().isAcidTable()); + } + else { + /*not sure why tableScan is sometimes null but if we are reading an Acid table we should + let the downstream processing know this + + For some reason this causes below error in some cases + java.lang.IllegalArgumentException: [Error 30020]: Neither the configuration variables schema.evolution.columns / schema.evolution.columns.types nor the columns / columns.types are set. Table schema information is required to read ACID tables + at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.getDesiredRowTypeDescr(OrcInputFormat.java:2496) + at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1695) + at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.getSplits(OrcInputFormat.java:1868) + at org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:506) + + */ + //AcidUtils.setTransactionalTableScan(conf, + // AcidUtils.isTablePropertyTransactional(table.getProperties())); + } } catch (HiveException e) { throw new IOException(e); }