Search in sources :

Example 1 with IcebergTableProcedureId

use of io.trino.plugin.iceberg.procedure.IcebergTableProcedureId in project trino by trinodb.

the class IcebergMetadata method getTableHandleForExecute.

@Override
public Optional<ConnectorTableExecuteHandle> getTableHandleForExecute(ConnectorSession session, ConnectorTableHandle connectorTableHandle, String procedureName, Map<String, Object> executeProperties, RetryMode retryMode) {
    IcebergTableHandle tableHandle = (IcebergTableHandle) connectorTableHandle;
    IcebergTableProcedureId procedureId;
    try {
        procedureId = IcebergTableProcedureId.valueOf(procedureName);
    } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException("Unknown procedure '" + procedureName + "'");
    }
    switch(procedureId) {
        case OPTIMIZE:
            return getTableHandleForOptimize(session, tableHandle, executeProperties, retryMode);
    }
    throw new IllegalArgumentException("Unknown procedure: " + procedureId);
}
Also used : IcebergTableProcedureId(io.trino.plugin.iceberg.procedure.IcebergTableProcedureId)

Aggregations

IcebergTableProcedureId (io.trino.plugin.iceberg.procedure.IcebergTableProcedureId)1