Gary Pendergast wrote:
Hi folks,
I've started work on moving the string functions to plugins. For those
following along at home, the branch is at:
https://code.launchpad.net/~pento/drizzle/drizzle-string-functions
Doin' a great job so far, Gary! :)
I've also made a blueprint:
https://blueprints.launchpad.net/drizzle/+spec/str-functions-as-plugins
On that note, Stewart, (or anyone else with that ability) could you make
it a dependency for:
https://blueprints.launchpad.net/drizzle/+spec/convert-functions-to-udfs
Done :)
One problem I'm running into fairly frequently is that string functions
are also reserved words. Ie, REVERSE, INSERT, LEFT, RIGHT, etc.
So, I have a couple of RFCs:
- Any requests for particular string functions to be in the same plugin?
I've put CONCAT/CONCAT_WS in the same, any others?
By "plugin", I believe you mean "source file"? The "plugin" is merely
the shared object file produced by the compilation process, and many
source files can be used, of course, in creating the shared object file.
I highly recommend having separate source files for different
functions (but very-much-related functions like concat and concat_ws can
surely go into the same source file). Just add the source files to the
plugin.ini and remember to run ./register_plugins.py to rebuild the
plugin properly.
I'd recommend something like this:
/plugin/string_functions/concat.cc
/plugin/string_functions/trim.cc
/plugin/string_functions/repeat.cc
/plugin/string_functions/pad.cc
etc, etc...
- Are their plans for allowing UDFs that create functions with the same
name as reserved words?
Yes. It's really just a matter of parser precedence. But, MontyT, would
you mind explaining any plans/changes coming up in the UDF world that
might help here?
Thanks!
Jay
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp