gaojun2048 commented on pull request #1881:
URL: 
https://github.com/apache/arrow-datafusion/pull/1881#issuecomment-1065889841


   In fact, after the external UDF/UDAF is registered with datafusion's 
`ExecutionContext` via the `register_udf` function, `LogicalPlan` can be 
deserialized via ExecutionContext 
   
   ```
   impl FunctionRegistry for ExecutionContext {
       fn udfs(&self) -> HashSet<String> {
           self.state.lock().udfs()
       }
   
       fn udf(&self, name: &str) -> Result<Arc<ScalarUDF>> {
           self.state.lock().udf(name)
       }
   
       fn udaf(&self, name: &str) -> Result<Arc<AggregateUDF>> {
           self.state.lock().udaf(name)
       }
   }
   ```
   get the implementation of UDF/UDAF. But that need add a function like this:
   
   ```
   fn from_proto_to_logicalplan(logical_plan: &protobuf::LogicalExprNode, ctx: 
&ExecutionContext) -> Result<LogicalPlan, Error>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to