Format the code of the UDF found within `create function` statements
for the udfs defined in create function statements, the code for the function itself is usually passed in as a string. Today we don't apply any formatting to this string (we treat it like any other quoted name, as data). But for language sql and language python udfs, it should be possible to format these functions, either natively or using black.
It may be tricky/dangerous to try to unquote and re-quote these functions.
We also don't have any way to track state (and/or find the language and code tokens), and conditionally apply formatting if one of the two known languages are used.
So generally this is probably not a good idea and not in the near-term roadmap; mostly noting this in case something similar comes along when working on other ddl/dml statements.
Related: consider formatting code in set blocks, if we can clearly detect that it's sql (e.g., if it starts with select ...). This is maybe a bad idea, but inspired from #326
I guess would also need to detect with block? What would it take to implement this? Do you have any pointers?
Mostly interested in formatting code inside set block or that inside multiline string block within '''select * from foo'''