use of io.crate.analyze.AnalyzedAlterTable in project crate by crate.
the class AlterTablePlan method bind.
public static BoundAlterTable bind(AnalyzedAlterTable analyzedAlterTable, CoordinatorTxnCtx txnCtx, NodeContext nodeCtx, Row params, SubQueryResults subQueryResults) {
Function<? super Symbol, Object> eval = x -> SymbolEvaluator.evaluate(txnCtx, nodeCtx, x, params, subQueryResults);
DocTableInfo docTableInfo = analyzedAlterTable.tableInfo();
AlterTable<Object> alterTable = analyzedAlterTable.alterTable().map(eval);
Table<Object> table = alterTable.table();
PartitionName partitionName = PartitionPropertiesAnalyzer.createPartitionName(table.partitionProperties(), docTableInfo);
TableParameters tableParameters = getTableParameterInfo(table, partitionName);
TableParameter tableParameter = getTableParameter(alterTable, tableParameters);
maybeRaiseBlockedException(docTableInfo, tableParameter.settings());
return new BoundAlterTable(docTableInfo, partitionName, tableParameter, table.excludePartitions(), docTableInfo.isPartitioned());
}
Aggregations