diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index 493e3a0..c34463a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -232,7 +232,6 @@ import org.slf4j.LoggerFactory; import org.stringtemplate.v4.ST; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; /** @@ -886,12 +885,21 @@ private int alterDatabase(Hive db, AlterDatabaseDesc alterDbDesc) throws HiveExc } private int dropIndex(Hive db, DropIndexDesc dropIdx) throws HiveException { + + if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) { + throw new UnsupportedOperationException("Indexes unsupported for Tez execution engine"); + } + db.dropIndex(dropIdx.getTableName(), dropIdx.getIndexName(), dropIdx.isThrowException(), true); return 0; } private int createIndex(Hive db, CreateIndexDesc crtIndex) throws HiveException { + if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) { + throw new UnsupportedOperationException("Indexes unsupported for Tez execution engine"); + } + if( crtIndex.getSerde() != null) { validateSerDe(crtIndex.getSerde()); } @@ -919,6 +927,11 @@ private int createIndex(Hive db, CreateIndexDesc crtIndex) throws HiveException } private int alterIndex(Hive db, AlterIndexDesc alterIndex) throws HiveException { + + if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) { + throw new UnsupportedOperationException("Indexes unsupported for Tez execution engine"); + } + String baseTableName = alterIndex.getBaseTableName(); String indexName = alterIndex.getIndexName(); Index idx = db.getIndex(baseTableName, indexName);