Search in sources :

Example 1 with CreateHandle

use of com.facebook.presto.execution.scheduler.ExecutionWriterTarget.CreateHandle in project presto by prestodb.

the class TestTableWriterOperator method createTableWriterOperator.

private Operator createTableWriterOperator(PageSinkManager pageSinkManager, OperatorFactory statisticsAggregation, List<Type> outputTypes, Session session, TaskMetadataContext taskMetadataContext, DriverContext driverContext) {
    List<String> notNullColumnNames = new ArrayList<>(1);
    notNullColumnNames.add(null);
    TableWriterOperatorFactory factory = new TableWriterOperatorFactory(0, new PlanNodeId("test"), pageSinkManager, new ConnectorMetadataUpdaterManager(), taskMetadataContext, new CreateHandle(new OutputTableHandle(CONNECTOR_ID, new ConnectorTransactionHandle() {
    }, new ConnectorOutputTableHandle() {
    }), new SchemaTableName("testSchema", "testTable")), ImmutableList.of(0), notNullColumnNames, session, statisticsAggregation, outputTypes, TABLE_COMMIT_CONTEXT_CODEC, NO_COMMIT);
    return factory.createOperator(driverContext);
}
Also used : PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) TableWriterOperatorFactory(com.facebook.presto.operator.TableWriterOperator.TableWriterOperatorFactory) OutputTableHandle(com.facebook.presto.metadata.OutputTableHandle) ConnectorOutputTableHandle(com.facebook.presto.spi.ConnectorOutputTableHandle) ConnectorOutputTableHandle(com.facebook.presto.spi.ConnectorOutputTableHandle) CreateHandle(com.facebook.presto.execution.scheduler.ExecutionWriterTarget.CreateHandle) ArrayList(java.util.ArrayList) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) SchemaTableName(com.facebook.presto.spi.SchemaTableName)

Aggregations

CreateHandle (com.facebook.presto.execution.scheduler.ExecutionWriterTarget.CreateHandle)1 ConnectorMetadataUpdaterManager (com.facebook.presto.metadata.ConnectorMetadataUpdaterManager)1 OutputTableHandle (com.facebook.presto.metadata.OutputTableHandle)1 TableWriterOperatorFactory (com.facebook.presto.operator.TableWriterOperator.TableWriterOperatorFactory)1 ConnectorOutputTableHandle (com.facebook.presto.spi.ConnectorOutputTableHandle)1 SchemaTableName (com.facebook.presto.spi.SchemaTableName)1 ConnectorTransactionHandle (com.facebook.presto.spi.connector.ConnectorTransactionHandle)1 PlanNodeId (com.facebook.presto.spi.plan.PlanNodeId)1 ArrayList (java.util.ArrayList)1