Aggregate function aliases error
There's some error in the register macro here, because you can't create an alias for aggregation functions.
Thanks for the report, I'll try to fix this soon (maybe const generics can make it better). Thought I had a test case for this...
Any chance you are able to share your use case? I need to redesign the internal API for this but don't know how it is being used in the wild.
I'm telling you: We have UDF functions that we update periodically. Using an alias is an ideal solution for testing and replacing a working function. For example: libxmedian_old.so is named xmedian and xmedian1 libxmedian_new.so is named xmedian and xmedian1 After compiling the new function we use xmedian from old.so and xmedian1 from new.so - compare how they work. If we are completely satisfied with the result, we simply recreate the xmedian function from the new.so file, instantly substituting it without recompiling. We still keep the old function (xmedian1 from old.so) - for testing purposes or if we find errors in the new function, we can return to the old one.
https://github.com/pluots/sql-udf/blob/main/udf-macros/tests/fail/missing_rename.rs#L7 You have a test if you forget to add an alias to the second part of the function, but no test of not successfully installing an alias to both parts of the function =)
I'm telling you: We have UDF functions that we update periodically. Using an alias is an ideal solution for testing and replacing a working function.
I meant I would like to see a link to your source code if it is public, not for this issue but just to get a feel for how this crate is being used (I'm trying to see where I can clean up the API). In any case, this should be fixed with version 0.5.5 from #60, give it a try and see if this works.
Thanks for bringing this up!