本文整理了Java中com.facebook.presto.metadata.Metadata.beginDelete()
方法的一些代码示例,展示了Metadata.beginDelete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.beginDelete()
方法的具体详情如下:
包路径:com.facebook.presto.metadata.Metadata
类名称:Metadata
方法名:beginDelete
[英]Begin delete query
[中]开始删除查询
代码示例来源:origin: prestodb/presto
private TableWriterNode.WriterTarget createWriterTarget(TableWriterNode.WriterTarget target)
{
// TODO: begin these operations in pre-execution step, not here
// TODO: we shouldn't need to store the schemaTableName in the handles, but there isn't a good way to pass this around with the current architecture
if (target instanceof TableWriterNode.CreateName) {
TableWriterNode.CreateName create = (TableWriterNode.CreateName) target;
return new TableWriterNode.CreateHandle(metadata.beginCreateTable(session, create.getCatalog(), create.getTableMetadata(), create.getLayout()), create.getTableMetadata().getTable());
}
if (target instanceof TableWriterNode.InsertReference) {
TableWriterNode.InsertReference insert = (TableWriterNode.InsertReference) target;
return new TableWriterNode.InsertHandle(metadata.beginInsert(session, insert.getHandle()), metadata.getTableMetadata(session, insert.getHandle()).getTable());
}
if (target instanceof TableWriterNode.DeleteHandle) {
TableWriterNode.DeleteHandle delete = (TableWriterNode.DeleteHandle) target;
return new TableWriterNode.DeleteHandle(metadata.beginDelete(session, delete.getHandle()), delete.getSchemaTableName());
}
throw new IllegalArgumentException("Unhandled target type: " + target.getClass().getSimpleName());
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
private TableWriterNode.WriterTarget createWriterTarget(TableWriterNode.WriterTarget target)
{
// TODO: begin these operations in pre-execution step, not here
if (target instanceof TableWriterNode.CreateName) {
TableWriterNode.CreateName create = (TableWriterNode.CreateName) target;
return new TableWriterNode.CreateHandle(metadata.beginCreateTable(session, create.getCatalog(), create.getTableMetadata(), create.getLayout()));
}
if (target instanceof TableWriterNode.InsertReference) {
TableWriterNode.InsertReference insert = (TableWriterNode.InsertReference) target;
return new TableWriterNode.InsertHandle(metadata.beginInsert(session, insert.getHandle()));
}
if (target instanceof TableWriterNode.DeleteHandle) {
TableWriterNode.DeleteHandle delete = (TableWriterNode.DeleteHandle) target;
return new TableWriterNode.DeleteHandle(metadata.beginDelete(session, delete.getHandle()));
}
throw new IllegalArgumentException("Unhandled target type: " + target.getClass().getSimpleName());
}
内容来源于网络,如有侵权,请联系作者删除!