本文整理了Java中com.facebook.presto.metadata.Metadata.getLayouts()
方法的一些代码示例,展示了Metadata.getLayouts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.getLayouts()
方法的具体详情如下:
包路径:com.facebook.presto.metadata.Metadata
类名称:Metadata
方法名:getLayouts
暂无
代码示例来源:origin: prestodb/presto
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableHandle, Constraint.alwaysTrue(), Optional.empty());
Split split = getLocalQuerySplit(session, layouts.get(0).getLayout().getHandle());
代码示例来源:origin: prestodb/presto
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableHandle, Constraint.alwaysTrue(), Optional.of(ImmutableSet.of(kdbTreeColumn)));
checkSpatialPartitioningTable(!layouts.isEmpty(), "Table is empty: %s", name);
代码示例来源:origin: prestodb/presto
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableScan.getTable(), Constraint.alwaysTrue(), Optional.empty());
if (layouts.size() == 1) {
layout = Iterables.getOnlyElement(layouts).getLayout();
代码示例来源:origin: prestodb/presto
TupleDomain<ColumnHandle> originalEnforcedConstraint = scan.getEnforcedConstraint();
List<TableLayoutResult> layouts = metadata.getLayouts(
session,
handle,
代码示例来源:origin: prestodb/presto
List<TableLayoutResult> layouts = metadata.getLayouts(
session,
node.getTable(),
代码示例来源:origin: prestodb/presto
private Object getHiveTableProperty(String tableName, Function<HiveTableLayoutHandle, Object> propertyGetter)
{
Session session = getSession();
Metadata metadata = ((DistributedQueryRunner) getQueryRunner()).getCoordinator().getMetadata();
return transaction(getQueryRunner().getTransactionManager(), getQueryRunner().getAccessControl())
.readOnly()
.execute(session, transactionSession -> {
Optional<TableHandle> tableHandle = metadata.getTableHandle(transactionSession, new QualifiedObjectName(catalog, TPCH_SCHEMA, tableName));
assertTrue(tableHandle.isPresent());
List<TableLayoutResult> layouts = metadata.getLayouts(transactionSession, tableHandle.get(), Constraint.alwaysTrue(), Optional.empty());
TableLayout layout = getOnlyElement(layouts).getLayout();
return propertyGetter.apply((HiveTableLayoutHandle) layout.getHandle().getConnectorHandle());
});
}
代码示例来源:origin: com.facebook.presto/presto-benchmark
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableHandle, Constraint.alwaysTrue(), Optional.empty());
Split split = getLocalQuerySplit(session, layouts.get(0).getLayout().getHandle());
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableScan.getTable(), Constraint.<ColumnHandle>alwaysTrue(), Optional.empty());
if (layouts.size() == 1) {
layout = Iterables.getOnlyElement(layouts).getLayout();
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
TableScanNode scan = (TableScanNode) node;
List<TableLayoutResult> layouts = metadata.getLayouts(
session,
handle,
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableHandle.get(), Constraint.<ColumnHandle>alwaysTrue(), Optional.empty());
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
List<TableLayoutResult> layouts = metadata.getLayouts(session, tableHandle.get(), Constraint.alwaysTrue(), Optional.empty());
if (layouts.size() != 1) {
throw new SemanticException(NOT_SUPPORTED, showPartitions, "Table does not have exactly one layout: %s", table);
代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive
private List<HivePartition> getPartitions(String tableName)
{
Session session = getSession();
Metadata metadata = ((DistributedQueryRunner) queryRunner).getCoordinator().getMetadata();
return transaction(queryRunner.getTransactionManager())
.readOnly()
.execute(session, transactionSession -> {
Optional<TableHandle> tableHandle = metadata.getTableHandle(transactionSession, new QualifiedObjectName(HIVE_CATALOG, TPCH_SCHEMA, tableName));
assertTrue(tableHandle.isPresent());
List<TableLayoutResult> layouts = metadata.getLayouts(transactionSession, tableHandle.get(), Constraint.alwaysTrue(), Optional.empty());
TableLayout layout = Iterables.getOnlyElement(layouts).getLayout();
return ((HiveTableLayoutHandle) layout.getHandle().getConnectorHandle()).getPartitions().get();
});
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
List<TableLayoutResult> layouts = metadata.getLayouts(
session, node.getTable(),
new Constraint<>(simplifiedConstraint, bindings -> !shouldPrune(constraint, node.getAssignments(), bindings)),
代码示例来源:origin: com.facebook.presto/presto-hive
private Object getHiveTableProperty(String tableName, Function<HiveTableLayoutHandle, Object> propertyGetter)
{
Session session = getSession();
Metadata metadata = ((DistributedQueryRunner) getQueryRunner()).getCoordinator().getMetadata();
return transaction(getQueryRunner().getTransactionManager(), getQueryRunner().getAccessControl())
.readOnly()
.execute(session, transactionSession -> {
Optional<TableHandle> tableHandle = metadata.getTableHandle(transactionSession, new QualifiedObjectName(catalog, TPCH_SCHEMA, tableName));
assertTrue(tableHandle.isPresent());
List<TableLayoutResult> layouts = metadata.getLayouts(transactionSession, tableHandle.get(), Constraint.alwaysTrue(), Optional.empty());
TableLayout layout = getOnlyElement(layouts).getLayout();
return propertyGetter.apply((HiveTableLayoutHandle) layout.getHandle().getConnectorHandle());
});
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
.intersect(node.getCurrentConstraint());
List<TableLayoutResult> layouts = metadata.getLayouts(
session, node.getTable(),
new Constraint<>(simplifiedConstraint, bindings -> true),
内容来源于网络,如有侵权,请联系作者删除!