com.facebook.presto.spi.ConnectorTableLayout Java Examples
The following examples show how to use
com.facebook.presto.spi.ConnectorTableLayout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ElasticsearchMetadata.java From presto-connectors with Apache License 2.0 | 5 votes |
@Override public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { ElasticsearchTableHandle tableHandle = (ElasticsearchTableHandle) table; ConnectorTableLayout layout = new ConnectorTableLayout(new ElasticsearchTableLayoutHandle(tableHandle, constraint.getSummary())); return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary())); }
Example #2
Source File: HbaseMetadata.java From presto-connectors with Apache License 2.0 | 5 votes |
@Override public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { HbaseTableHandle tableHandle = (HbaseTableHandle) table; ConnectorTableLayout layout = new ConnectorTableLayout(new HbaseTableLayoutHandle(tableHandle, constraint.getSummary())); return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary())); }
Example #3
Source File: ParaflowMetadata.java From paraflow with Apache License 2.0 | 5 votes |
@Override public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { ParaflowTableHandle paraflowTable = checkType(table, ParaflowTableHandle.class, "table"); SchemaTableName tableName = paraflowTable.getSchemaTableName(); ParaflowTableLayoutHandle tableLayout = paraflowMetaDataReader.getTableLayout(connectorId, tableName.getSchemaName(), tableName.getTableName()).orElse(null); if (tableLayout == null) { return ImmutableList.of(); } tableLayout.setPredicates(constraint.getSummary() != null ? Optional.of(constraint.getSummary()) : Optional.empty()); ConnectorTableLayout layout = getTableLayout(session, tableLayout); return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary())); }
Example #4
Source File: KuduMetadata.java From presto-kudu with Apache License 2.0 | 5 votes |
@Override public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle tableHandle, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns) { KuduTableHandle handle = fromConnectorTableHandle(session, tableHandle); ConnectorTableLayout layout = new ConnectorTableLayout( new KuduTableLayoutHandle(handle, constraint.getSummary(), desiredColumns)); return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary())); }
Example #5
Source File: KinesisMetadata.java From presto-kinesis with Apache License 2.0 | 5 votes |
@Override public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession connectorSession, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> optional) { KinesisTableHandle tblHandle = handleResolver.convertTableHandle(table); ConnectorTableLayout layout = new ConnectorTableLayout(new KinesisTableLayoutHandle(connectorId, tblHandle)); return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary())); }
Example #6
Source File: ElasticsearchMetadata.java From presto-connectors with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle) { return new ConnectorTableLayout(handle); }
Example #7
Source File: HbaseMetadata.java From presto-connectors with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle) { return new ConnectorTableLayout(handle); }
Example #8
Source File: ParaflowMetadata.java From paraflow with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle) { ParaflowTableLayoutHandle layoutHandle = checkType(handle, ParaflowTableLayoutHandle.class, "tableLayoutHandle"); return new ConnectorTableLayout(layoutHandle); }
Example #9
Source File: EthereumMetadata.java From presto-ethereum with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle) { return new ConnectorTableLayout(handle); }
Example #10
Source File: KuduMetadata.java From presto-kudu with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle) { return new ConnectorTableLayout(handle); }
Example #11
Source File: KinesisMetadata.java From presto-kinesis with Apache License 2.0 | 4 votes |
@Override public ConnectorTableLayout getTableLayout(ConnectorSession connectorSession, ConnectorTableLayoutHandle connectorTableLayoutHandle) { return new ConnectorTableLayout(connectorTableLayoutHandle); }