Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Security of predefined UDFs

...

 Built-in functionPredefined UDFTMUDF (not predefined)
LanguageC++C++, JavaC++, Java
InterfaceComplex internal interfaceTMUDF interfaceTMUDF interface
PrivilegesAnyone can execute built-in functionsDepends on UDFAnyone can execute predefined UDFsGrant/revoke
NameOne-part nameOne-part name, can be eclipsed by a UDF of the same name in the default schema3-part name
MetadataHard-wired in source codeNo metadata in metadata tables, uses TMUDF compiler interfaceMetadata tables and optional TMUDF compiler interface
SyntaxSpecial syntax can be defined in Trafodion parserUDF syntax or special syntax, defined in Trafodion parserUDF syntax only
ExecutionIn the Trafodion engine (master executor, ESP)In a separate tdm_udrserv processIn a separate tdm_udrserv process

If you want to add a predefined TMUDF, you can follow the example of an existing one: https://github.com/apache/trafodion/blob/master/core/sql/sqludr/SqlUdrPredefTimeSeries.cpp. There are other predefined UDFs like event_log_reader and jdbc, but those should have been made regular UDRs (mea culpa), since not all system administrators may want to give access to those UDFs.

Built-in Functions

The tightest integration can of course be achieved by adding to one of the class hierarchies in Trafodion. Here are the main ones used to extend the code:

...