From teiid-commits at lists.jboss.org Thu Apr 28 14:03:41 2011 Content-Type: multipart/mixed; boundary="===============0078183175010233914==" MIME-Version: 1.0 From: teiid-commits at lists.jboss.org To: teiid-commits at lists.jboss.org Subject: [teiid-commits] teiid SVN: r3129 - trunk/documentation/developer-guide/src/main/docbook/en-US/content. Date: Thu, 28 Apr 2011 14:03:41 -0400 Message-ID: <201104281803.p3SI3fni018580@svn01.web.mwc.hst.phx2.redhat.com> --===============0078183175010233914== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: rareddy Date: 2011-04-28 14:03:41 -0400 (Thu, 28 Apr 2011) New Revision: 3129 Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/content/udf.x= ml Log: TEIID-1569: updating the doc to reflect the development of the udf pushdown= functions. Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/conten= t/udf.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/documentation/developer-guide/src/main/docbook/en-US/content/udf.= xml 2011-04-28 16:15:17 UTC (rev 3128) +++ trunk/documentation/developer-guide/src/main/docbook/en-US/content/udf.= xml 2011-04-28 18:03:41 UTC (rev 3129) @@ -8,8 +8,8 @@ creating a UDF.
UDF Definition - A FunctionDefinition.xmi file provides metadata to the - query engine on User Defined Functions. See the Designer Documentation = for more on creating a Function Definition Model. + A {FunctionDefinition}.xmi file provides metadata to the query eng= ine on User Defined Functions. = + See the Designer Documentation for more on creating a Function Def= inition Model. The following are used to define a UDF. @@ -56,7 +56,8 @@ Pushdown - can be one of REQUIRED, NEVER, ALLOWED. Indicates the expected pushdown behavior. If NEVER or ALLOWED are specified then a Java - implementation of the function should be supplied. + implementation of the function should be supplied. If REQUIRED is use= d, then user must extend the = + Translator for the source and add this function to its= pushdown function library. @@ -78,6 +79,12 @@ Even pushdown required functions need to be added as a UDF to = allow = Teiid to properly parse and resolve the function. Pushdown scalar func= tions differ from normal user-defined functions in that no code is provided= for evaluation in the engine. = An exception will be raised if a pushdown required function cannot be= evaluated by the appropriate source. + = + + Dynamic VDBs + Currently there is no provision to add UDF when you are = working with the Dynamic VDBs. However, you can + extend the Translator to define source pushdown functions. + =
Source Supported UDF @@ -115,8 +122,8 @@ Required - extend the OracleExecutionFactory and add SCORE and CONTAINS as - supported functions. For this example, we'll call the class - MyOracleExecutionFactory. Add the + supported pushdown functions by either overriding or adding additiona= l functions in "getPushDownFunctions" method. = + For this example, we'll call the class MyOracleExecuti= onFactory. Add the org.teiid.translator.Translator annotation to the class, e.g. @Translator(name=3D"myoracle") @@ -133,7 +140,9 @@ Create a new translator jar containing your custom ExecutionFactory. Refer to and = - for instructions on using the J= AR file. + for instructions on using the J= AR file. Once this is extended = + translator is deployed in the Teiid Server, use "myora= cle" as + translator name instead of the "oracle" in your VDB's = Oracle source configuration. --===============0078183175010233914==--