On Fri, 2008-08-01 at 18:08 -0700, Brian Aker wrote: > This is how loopkup of a function works: > > 1) We look up in a perfect hash (precomputed during compile). > 2) We then look up in the UDF function hash. > > Moving functions from one to the other does not buy you much. Stewart > has been pushing "less" in the core, which I am for. An entire package > of math functions would be nice.
My current work-in-progress looks something like this:
plugin_init for function registers a struct function with db kernel (for
each function plugin provides. e.g. for COMPRESS/UNCOMPRESS not much
sense just having one in a plugin).
db kernel adds these functions to hash (currently udf hash).
struct function contains info such as function name, and a pointer to
create_item, a function that returns a Item*.
in sql_yacc.yy:
function:
Item* i= find_udf (as it's currently known)
i->push(parameter); // loop for each parameter
the current way of giving parameters to functions is a bit dumb... so
going to fix that too (push parameters on, how ever many there are,
perhaps have a specifier for max params in Item_func).
a lot of code gets to go away at the same time, which is nice :)
Another problem to solve is making it easier/nicer to list what plugins
you want to load.
--
Stewart Smith ([EMAIL PROTECTED])
http://www.flamingspork.com/
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

