gaojun2048 opened a new issue #1594:
URL: https://github.com/apache/arrow-datafusion/issues/1594


   Now if we want to define our own udf/udaf function, we also have to modify 
the implementation of ballista. Because `ScalarFunction` and 
`AggregateFunction` are defined as enum in ballista's proto file, and enum is 
checked when LogicPlan is serialized to proto and proto is deserialized to 
LogicPlan.
   
   In fact, an optional way is to define `ScalarFunction` and 
`AggregateFunction` as string type in proto. And serialize and deserialize via 
to_str and from_str (I see that all functions already implement `fmt::Display` 
and `FromStr` traits). In this way, adding a new function only needs to 
implement the `fmt::Display` and `FromStr` traits, and there is no need to 
modify the ballista.
   
   I am a user of an arrow-datafusion project and encountered this problem in 
our project. I'm not sure if this issue is an acceptable one, and if so, I'll 
submit a PR to implement this issue.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to