I've added support for %declare and %define, and some UDF magic.
If you define a UDF like this:
define 'my_udf', :function => 'com.example.Foo'
you can use it in field context like this:
a.foreach { |r| [my_udf(r[0]).as(:awesome)] }
which would result in this Pig Latin code:
FOREACH a GENERATE my_udf($0) AS awesome
cool, huh?
T#
-D
nope, the string passed to :function => will be output verbatim, so
that's the way to go now. give me a Pig Latin example of what you want
to do and I'll add it to Piglet (may oversights on my part are due to
my inexperience with many aspects of Pig Latin, I have yet to use UDFs
for example).
T#