I want to package some common logic in a \'function\', and input a table as params , get another table as result; Can we do this by create an udf or a macro or other ways?