/** * @return whether this table is actually a view */ public boolean isView() { return TableType.VIRTUAL_VIEW.equals(getTableType()); }
public boolean isMaterializedView() { return TableType.MATERIALIZED_VIEW.equals(getTableType()); }
/** * @return whether this table is actually an index table */ public boolean isIndexTable() { return TableType.INDEX_TABLE.equals(getTableType()); }
/** * @return whether this table is actually a view */ public boolean isView() { return TableType.VIRTUAL_VIEW.equals(getTableType()); }
public boolean isMaterializedView() { return TableType.MATERIALIZED_VIEW.equals(getTableType()); }
private void checkExternalTable(Table dest_tab) throws SemanticException { if ((!conf.getBoolVar(HiveConf.ConfVars.HIVE_INSERT_INTO_EXTERNAL_TABLES)) && (dest_tab.getTableType().equals(TableType.EXTERNAL_TABLE))) { throw new SemanticException( ErrorMsg.INSERT_EXTERNAL_TABLE.getMsg(dest_tab.getTableName())); } }
if (TableType.EXTERNAL_TABLE.equals(qlMdTable.getTableType())) { withinContext.replicationSpec.setNoop(true);
if (!tbl.getTableType().equals(TableType.INDEX_TABLE)) { console.printError("Table " + tbl.getTableName() + " not specified."); return 1;
boolean shouldWriteExternalTableLocationInfo = conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) && TableType.EXTERNAL_TABLE.equals(tableTuple.object.getTableType()) && !conf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY); if (shouldWriteExternalTableLocationInfo) {
&& TableType.EXTERNAL_TABLE.equals(Enum.valueOf(TableType.class, tableType)); return new Tuple(isExternalTable, writeId); } catch (Exception e) {
for (String tableName : Utils.matchesTbl(hiveDb, dbName, work.tableNameOrPattern)) { Table table = hiveDb.getTable(dbName, tableName); if (TableType.EXTERNAL_TABLE.equals(table.getTableType())) { writer.dataLocationDump(table);
return; if (!TableType.EXTERNAL_TABLE.equals(table.getTableType())) { throw new IllegalArgumentException( "only External tables can be writen via this writer, provided table is " + table
if (oldView.getTableType().equals(TableType.VIRTUAL_VIEW) && createVwDesc.isMaterialized()) { throw new SemanticException(ErrorMsg.REPLACE_VIEW_WITH_MATERIALIZED, oldView.getTableName()); if (oldView.getTableType().equals(TableType.MATERIALIZED_VIEW) && !createVwDesc.isMaterialized()) { throw new SemanticException(ErrorMsg.REPLACE_MATERIALIZED_WITH_VIEW, if (!oldView.getTableType().equals(TableType.VIRTUAL_VIEW) && !oldView.getTableType().equals(TableType.MATERIALIZED_VIEW)) { String tableNotViewErrorMsg = "The following is an existing table, not a view: " +
&& !TableType.EXTERNAL_TABLE.equals(table.getTableType()) ) || tuple.isConvertedFromManagedToExternal; if (shouldCreateLoadTableTask) {
|| (TableType.EXTERNAL_TABLE.equals(table.getTableType()) && !event.replicationSpec().isMigratingToExternalTable() );
try { Table table = new Table(metadata.getTable()); boolean externalTableOnSource = TableType.EXTERNAL_TABLE.equals(table.getTableType()); if (TableType.EXTERNAL_TABLE.equals(table.getTableType())) { if (TableType.EXTERNAL_TABLE.equals(table.getTableType())) { tableDesc.setLocation( table.getDataLocation() == null ? null : table.getDataLocation().toString());
if (oldView.getTableType().equals(TableType.VIRTUAL_VIEW) && createVwDesc.isMaterialized()) { throw new SemanticException(ErrorMsg.REPLACE_VIEW_WITH_MATERIALIZED, oldView.getTableName()); if (oldView.getTableType().equals(TableType.MATERIALIZED_VIEW) && !createVwDesc.isMaterialized()) { throw new SemanticException(ErrorMsg.REPLACE_MATERIALIZED_WITH_VIEW, if (!oldView.getTableType().equals(TableType.VIRTUAL_VIEW) && !oldView.getTableType().equals(TableType.MATERIALIZED_VIEW)) { String tableNotViewErrorMsg = "The following is an existing table, not a view: " +
if (TableType.MANAGED_TABLE.equals(ts.tableHandle.getTableType()) && conf.getBoolVar(HiveConf.ConfVars.HIVECHECKFILEFORMAT)) { ensureFileFormatsMatch(ts, files, fromURI);
&& (!table.isPartitioned() || !table.getTableType().equals(TableType.EXTERNAL_TABLE)) ){ throw new SemanticException(ErrorMsg.INCOMPATIBLE_SCHEMA.getMsg(
if(tbl.getTableType().equals(TableType.EXTERNAL_TABLE)) { throw new SemanticException(ErrorMsg.ANALYZE_TABLE_PARTIALSCAN_EXTERNAL_TABLE.getMsg(tbl .getTableName()));