Search in sources :

Example 1 with DropUserDefinedFunctionRequest

use of io.crate.expression.udf.DropUserDefinedFunctionRequest in project crate by crate.

the class DropFunctionPlan method executeOrFail.

@Override
public void executeOrFail(DependencyCarrier dependencies, PlannerContext plannerContext, RowConsumer consumer, Row params, SubQueryResults subQueryResults) throws Exception {
    DropUserDefinedFunctionRequest request = new DropUserDefinedFunctionRequest(analyzedDropFunction.schema(), analyzedDropFunction.name(), analyzedDropFunction.argumentTypes(), analyzedDropFunction.ifExists());
    OneRowActionListener<AcknowledgedResponse> listener = new OneRowActionListener<>(consumer, r -> new Row1(1L));
    dependencies.dropFunctionAction().execute(request, listener);
}
Also used : Row1(io.crate.data.Row1) OneRowActionListener(io.crate.execution.support.OneRowActionListener) AcknowledgedResponse(org.elasticsearch.action.support.master.AcknowledgedResponse) DropUserDefinedFunctionRequest(io.crate.expression.udf.DropUserDefinedFunctionRequest)

Aggregations

Row1 (io.crate.data.Row1)1 OneRowActionListener (io.crate.execution.support.OneRowActionListener)1 DropUserDefinedFunctionRequest (io.crate.expression.udf.DropUserDefinedFunctionRequest)1 AcknowledgedResponse (org.elasticsearch.action.support.master.AcknowledgedResponse)1