use of io.crate.metadata.blob.BlobTableInfo in project crate by crate.
the class AlterBlobTableAnalyzer method analyze.
public AlterBlobTableAnalyzedStatement analyze(AlterBlobTable node, Row parameters) {
TableIdent tableIdent = tableToIdent(node.table());
assert BlobSchemaInfo.NAME.equals(tableIdent.schema()) : "schema name must be 'blob'";
BlobTableInfo tableInfo = (BlobTableInfo) schemas.getTableInfo(tableIdent);
TableParameter tableParameter = new TableParameter();
if (node.genericProperties().isPresent()) {
TablePropertiesAnalyzer.analyze(tableParameter, tableInfo.tableParameterInfo(), node.genericProperties(), parameters);
} else if (!node.resetProperties().isEmpty()) {
TablePropertiesAnalyzer.analyze(tableParameter, tableInfo.tableParameterInfo(), node.resetProperties());
}
return new AlterBlobTableAnalyzedStatement(tableInfo, tableParameter);
}
use of io.crate.metadata.blob.BlobTableInfo in project crate by crate.
the class DropBlobTableAnalyzer method analyze.
public DropBlobTableAnalyzedStatement analyze(DropBlobTable node) {
TableIdent tableIdent = tableToIdent(node.table());
BlobTableInfo tableInfo = null;
boolean isNoop = false;
try {
tableInfo = (BlobTableInfo) schemas.getTableInfo(tableIdent);
} catch (ResourceUnknownException e) {
if (node.ignoreNonExistentTable()) {
isNoop = true;
} else {
throw e;
}
}
return new DropBlobTableAnalyzedStatement(tableInfo, isNoop, node.ignoreNonExistentTable());
}
Aggregations