[
https://issues.apache.org/jira/browse/CALCITE-2046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347775#comment-16347775
]
Julian Hyde commented on CALCITE-2046:
--------------------------------------
We already have Function, ScalarFunction, AggregateFunction and TableFunction
in org.apache.calcite.schema. Are they sufficient? (There is some documentation
in http://calcite.apache.org/docs/adapter.html#functions-and-operators, but to
really understand how to use them, read UdfTest.)
We can also load classes and methods as UDFs even if they do not implement an
interface. Perhaps we could add an interface Extension and add some annotations
to indicate which methods to load as functions. (This should be a secondary
task.)
As I said previously, I don't like {{CREATE FUNCTION ... USING JAR}} because it
doesn't create one function, it creates several. Oracle has {{CREATE LIBRARY}},
so how about the following? {code}CREATE LIBRARY libraryName AS fullClassPath
USING JAR 'jarPath' [, 'jarPath' ]...{code} It creates a named object so we
could add {{ALTER LIBRARY}} and {{DROP LIBRARY}} later, to implement a full
life-cycle.
> Support "CREATE FUNCTION" DDL
> -----------------------------
>
> Key: CALCITE-2046
> URL: https://issues.apache.org/jira/browse/CALCITE-2046
> Project: Calcite
> Issue Type: New Feature
> Reporter: Shuyi Chen
> Assignee: Julian Hyde
> Priority: Major
>
> We want to add DDL support for creating external function like Apache Drill
> ([https://drill.apache.org/docs/create-function-using-jar/]).
> {code:java}
> CREATE FUNCTION USING JAR '<jar_name>.jar';
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)