このコンテンツは選択した言語では利用できません。

10.5. Scalar Functions


The method ExecutionFactory.getSupportedFunctions() can be used to specify which scalar and aggregate functions the Translator supports. The set of possible functions is based on the set of functions supported by JBoss Data Virtualization. This set can be found in the JBoss Data Virtualization Reference Guide. If the Translator states that it supports a function, it must support all type combinations and overloaded forms of that function.
There are also some standard operators that can be specified in the supported function list: +, -, *, and /.
The constants interface SourceSystemFunctions contains the string names of all possible built-in pushdown functions. Note that not all system functions appear in this list. This is because some system functions will always be evaluated in JBoss Data Virtualization, are simple aliases to other functions, or are rewritten to a more standard expression.
A translator may also indicate support for scalar functions that are intended for pushdown evaluation by that translator, but are not registered as user defined functions via a model/schema. These pushdown functions are reported to the engine via the ExecutionFactory.getPushDownFunctions() list as FunctionMethod metadata objects. The FuncitonMethod representation allow the translator to control all of the metadata related to the function, including type signature, determinism, varargs, etc. The simplest way to add a pushdown function is with a call to ExecutionFactory.addPushDownFunction :
FunctionMethod addPushDownFunction(String qualifier, String name, String returnType, String...paramTypes)
Copy to Clipboard Toggle word wrap
This resulting function will be known as sys.qualifier.name, but can be called with name only as long as the function name is unique. The returned FunctionMethod object may be further manipulated depending upon the needs of the source. An example of adding a custom concat vararg function in an ExecutionFactory subclass:
public void start() throws TranslatorException {
  super.start();
  FunctionMethod func = addPushDownFunciton("oracle", "concat", "string", "string", "string");
  func.setVarArgs(true);
  ...
}
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat