Search in sources :

Example 1 with DeltaLakeTableProcedureId

use of io.trino.plugin.deltalake.procedure.DeltaLakeTableProcedureId in project trino by trinodb.

the class DeltaLakeMetadata method getTableHandleForExecute.

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

Aggregations

DeltaLakeTableProcedureId (io.trino.plugin.deltalake.procedure.DeltaLakeTableProcedureId)1