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);
}
Aggregations