Search in sources :

Example 1 with OutputTableHandle

use of com.facebook.presto.metadata.OutputTableHandle in project presto by prestodb.

the class TestTableWriterOperator method createTableWriterOperator.

private Operator createTableWriterOperator(BlockingPageSink blockingPageSink) {
    PageSinkManager pageSinkProvider = new PageSinkManager();
    pageSinkProvider.addConnectorPageSinkProvider(CONNECTOR_ID, new ConstantPageSinkProvider(blockingPageSink));
    TableWriterOperator.TableWriterOperatorFactory factory = new TableWriterOperator.TableWriterOperatorFactory(0, new PlanNodeId("test"), pageSinkProvider, new TableWriterNode.CreateHandle(new OutputTableHandle(CONNECTOR_ID, new ConnectorTransactionHandle() {
    }, new ConnectorOutputTableHandle() {
    }), new SchemaTableName("testSchema", "testTable")), ImmutableList.of(0), TEST_SESSION);
    return factory.createOperator(createTaskContext(executor, TEST_SESSION).addPipelineContext(0, true, true).addDriverContext());
}
Also used : PlanNodeId(com.facebook.presto.sql.planner.plan.PlanNodeId) OutputTableHandle(com.facebook.presto.metadata.OutputTableHandle) ConnectorOutputTableHandle(com.facebook.presto.spi.ConnectorOutputTableHandle) ConnectorOutputTableHandle(com.facebook.presto.spi.ConnectorOutputTableHandle) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) TableWriterNode(com.facebook.presto.sql.planner.plan.TableWriterNode) SchemaTableName(com.facebook.presto.spi.SchemaTableName) PageSinkManager(com.facebook.presto.split.PageSinkManager)

Aggregations

OutputTableHandle (com.facebook.presto.metadata.OutputTableHandle)1 ConnectorOutputTableHandle (com.facebook.presto.spi.ConnectorOutputTableHandle)1 SchemaTableName (com.facebook.presto.spi.SchemaTableName)1 ConnectorTransactionHandle (com.facebook.presto.spi.connector.ConnectorTransactionHandle)1 PageSinkManager (com.facebook.presto.split.PageSinkManager)1 PlanNodeId (com.facebook.presto.sql.planner.plan.PlanNodeId)1 TableWriterNode (com.facebook.presto.sql.planner.plan.TableWriterNode)1