use of io.crate.metadata.table.ShardedTable in project crate by crate.
the class AlterTableRerouteAnalyzer method analyze.
public AnalyzedStatement analyze(AlterTableReroute<Expression> alterTableReroute, ParamTypeHints paramTypeHints, CoordinatorTxnCtx transactionContext) {
// safe to expect a `ShardedTable` since getTableInfo with
// Operation.ALTER_REROUTE raises a appropriate error for sys tables
ShardedTable tableInfo;
RelationName relationName;
if (alterTableReroute.blob()) {
relationName = fromBlobTable(alterTableReroute.table());
} else {
relationName = schemas.resolveRelation(alterTableReroute.table().getName(), transactionContext.sessionContext().searchPath());
}
tableInfo = schemas.getTableInfo(relationName, Operation.ALTER_REROUTE);
return alterTableReroute.rerouteOption().accept(rerouteOptionVisitor, new Context(tableInfo, alterTableReroute.table().partitionProperties(), transactionContext, nodeCtx, paramTypeHints));
}
Aggregations