此内容没有您所选择的语言版本。

Chapter 11. User Defined Functions


11.1. User Defined Functions

Teiid Designer enables you to extend Teiid's function library by using custom or User Defined Functions(UDFs). You can define a UDF with follwing properties.
  • Function Name - When you create the function name, remember that:
    • You cannot overload existing Teiid System functions.
    • The function name must be unique among user defined functions in its model for the number of arguments. You can use the same function name for different numbers of types of arguments. Hence, you can overload your user defined functions.
    • The function name cannot contain the '.' character.
    • The function name cannot exceed 255 characters.
  • Input Parameters- Input Parameter defines a type specific signature list. All arguments are considered required.
  • Return Type- the expected type of the returned scalar value.
  • Pushdown - Indicates the expected pushdown behavior. It can be one of REQUIRED, NEVER, ALLOWED. If NEVER or ALLOWED are specified then a Java implementation of the function must be supplied. If REQUIRED is used, then user must extend the Translator for the source and add this function to its pushdown function library.
  • invocationClass/invocationMethod- optional properties indicating the method to invoke when the UDF is not pushed down.
  • Deterministic - if the method always returns the same result for the same input parameters. Defaults to false. It is important to mark the function as deterministic if it returns the same value for the same inputs as this leads to better performance.
Even Pushdown required functions need to be added as a UDF to allow Teiid to properly parse and resolve the function. Pushdown scalar functions differ from normal user defined functions in that no code is provided for evaluation in the engine. An exception is raised if a pushdown required function cannot be evaluated by the appropriate source.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat