com.facebook.presto.metadata.Metadata.metadataDelete()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中com.facebook.presto.metadata.Metadata.metadataDelete()方法的一些代码示例,展示了Metadata.metadataDelete()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.metadataDelete()方法的具体详情如下:
包路径:com.facebook.presto.metadata.Metadata
类名称:Metadata
方法名:metadataDelete

Metadata.metadataDelete介绍

[英]Delete the provide table layout
[中]删除“提供表格布局”

代码示例

代码示例来源:origin: prestodb/presto

@Override
  public Page getOutput()
  {
    if (finished) {
      return null;
    }
    finished = true;

    OptionalLong rowsDeletedCount = metadata.metadataDelete(session, tableHandle, tableLayout);

    // output page will only be constructed once,
    // so a new PageBuilder is constructed (instead of using PageBuilder.reset)
    PageBuilder page = new PageBuilder(1, TYPES);
    BlockBuilder rowsBuilder = page.getBlockBuilder(0);
    page.declarePosition();
    if (rowsDeletedCount.isPresent()) {
      BIGINT.writeLong(rowsBuilder, rowsDeletedCount.getAsLong());
    }
    else {
      rowsBuilder.appendNull();
    }
    return page.build();
  }
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

@Override
  public Page getOutput()
  {
    if (finished) {
      return null;
    }
    finished = true;

    OptionalLong rowsDeletedCount = metadata.metadataDelete(session, tableHandle, tableLayout);

    PageBuilder page = new PageBuilder(TYPES);
    BlockBuilder rowsBuilder = page.getBlockBuilder(0);
    page.declarePosition();
    if (rowsDeletedCount.isPresent()) {
      BIGINT.writeLong(rowsBuilder, rowsDeletedCount.getAsLong());
    }
    else {
      rowsBuilder.appendNull();
    }
    return page.build();
  }
}

相关文章