You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to provide a simplified interface for the most common needs:
#[udf]fnmy_udf(a:Option<&str>,b:f64,c:&str) -> Option<i32>{}#[udf]fnmy_udf2(cache:&mutVec<u8>,a:Option<&str>,b:f64,c:&str) -> Result<&[u8],String>{}// If init is not specified, default to Default#[udf(init = MyStruct::new())]fnmy_udf3(cache:&mutMyStruct,a:Option<&str>,b:f64,c:&str) -> &[u8]{}// desugars to something likemod my_udf_mod {structMyUdf(Vec<u8>);#[register]implBasicUdfforMyUdf{
returning = Option<i32>;fninit(...){/* autogenerated, verify types */}fnprocess(&mutself...){// generate user defined typeslet arg1 = args.get(0).as_str();my_udf(self.0, arg1, arg2, arg3)}}fnmy_udf(a:Option<&str>,b:f64,c:&str) -> Option<i32>{}}
The work would be entirely in the proc macro and would just desugar to our current traits. Some way to define >1 function signature would also be cool, but I don't quite know how to combine them together without having them in the same block
The text was updated successfully, but these errors were encountered:
It would be nice to provide a simplified interface for the most common needs:
The work would be entirely in the proc macro and would just desugar to our current traits. Some way to define >1 function signature would also be cool, but I don't quite know how to combine them together without having them in the same block
The text was updated successfully, but these errors were encountered: