|| at Oct 15, 2009 at 10:00 am
We use a single instance of the udf for each node in the expression tree.
For example, in a+b, + will be called by all the rows of the table,
and we have a single instance of +.
However, in a+b+c, there will be 2 instances of +.
in a lot of the udfs, we already do such initializations. Take a look
at UDFRegExp.java for an example.
On 10/14/09, Vijay wrote:
If I have a custom udf, is it treated as a singleton? If there is some heavy
initialization for the udf that would obviously help. In this case though
i'd imagine the udf must be thread-safe.
Sent from Gmail for mobile | mobile.google.com