public TableDesc create(QueryContext queryContext, CreateTableNode createTable, boolean ifNotExists) throws IOException, TajoException { TableMeta meta; if (createTable.hasOptions()) { meta = CatalogUtil.newTableMeta(createTable.getStorageType(), createTable.getOptions()); } else { meta = CatalogUtil.newTableMeta(createTable.getStorageType(), queryContext.getConf()); } if(PlannerUtil.isFileStorageType(createTable.getStorageType()) && createTable.isExternal()){ Preconditions.checkState(createTable.hasUri(), "ERROR: LOCATION must be given."); } return create( queryContext, createTable.getTableName(), createTable.getTableSpaceName(), createTable.getTableSchema(), meta, createTable.getUri(), createTable.isExternal(), createTable.getPartitionMethod(), ifNotExists); }
public TableDesc create(QueryContext queryContext, CreateTableNode createTable, boolean ifNotExists) throws IOException, TajoException { TableMeta meta; if (createTable.hasOptions()) { meta = CatalogUtil.newTableMeta(createTable.getStorageType(), createTable.getOptions()); } else { meta = CatalogUtil.newTableMeta(createTable.getStorageType(), queryContext.getConf()); } if(PlannerUtil.isFileStorageType(createTable.getStorageType()) && createTable.isExternal()){ Preconditions.checkState(createTable.hasUri(), "ERROR: LOCATION must be given."); } return create( queryContext, createTable.getTableName(), createTable.getTableSpaceName(), createTable.getTableSchema(), meta, createTable.getUri(), createTable.isExternal(), createTable.getPartitionMethod(), ifNotExists); }