You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Roger Fischer (CW)" <rf...@Brocade.com> on 2017/07/20 03:30:41 UTC

Custom SQL Functions

Hello,

I have a couple of questions on custom SQL functions:

1) Can functions be overloaded, ie. could there be a to_string( Date) and a to_string( Double) function?

2) If yes, how is the applicable function identified? Based on parameters? Or does the function need to be qualified with the class name?

3) How are functions registered using XML configuration? The documentation only shows programmatic registration.

Thanks...

Roger


Re: Custom SQL Functions

Posted by afedotov <al...@gmail.com>.
Hello,

1) No, functions can't be overloaded. Functions with the same name must
have a different number of parameters
3) To register a class with custom SQL functions via XML just use regular
Spring bean notation

<bean id="ccfg" class="org.apache.ignite.configuration.CacheConfiguration">
    ...
    <property name="sqlFunctionClasses">
        <list>
            <value>Functions1.class</value>
            <value>Functions2</value>
            ...
        </list>
    </property>
</bean>


Kind regards,
Alex.

On Thu, Jul 20, 2017 at 6:31 AM, Roger Fischer (CW) [via Apache Ignite
Users] <ml...@n6.nabble.com> wrote:

> Hello,
>
>
>
> I have a couple of questions on custom SQL functions:
>
>
>
> 1) Can functions be overloaded, ie. could there be a to_string( Date) and
> a to_string( Double) function?
>
>
>
> 2) If yes, how is the applicable function identified? Based on parameters?
> Or does the function need to be qualified with the class name?
>
>
>
> 3) How are functions registered using XML configuration? The documentation
> only shows programmatic registration.
>
>
>
> Thanks…
>
>
>
> Roger
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Custom-
> SQL-Functions-tp15153.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Custom-SQL-Functions-tp15153p15170.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.