phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hell cruz <hellfiret...@gmail.com>
Subject error on executing UDF on Jdbctemplate
Date Tue, 25 Aug 2015 09:50:46 GMT
Hi

   I have created a UDF  when i run it to sqlline

0: jdbc:phoenix:localhost> select ENCODE_ADD(ARRAY[scr,ci ]) as address
from contact;
+------------------------------------------+
|                 ADDRESS                  |
+------------------------------------------+
| ["O1IC","3288d2d6-fa23-4262-865e-1dee4b1c26d6"] |
+------------------------------------------+
1 row selected (0.167 seconds)
0: jdbc:phoenix:localhost>

its working

but when i run it on jdbctemple this error occur
*nested exception is org.apache.phoenix.exception.PhoenixParserException:
ERROR 605 (42P00): Syntax error. Unknown function: "ENCODE_ADD".*

here is my config
<bean id="phoenixDs"
        class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName"
value="org.apache.phoenix.jdbc.PhoenixDriver" />
        <property name="url" value="jdbc:phoenix:localhost" />
        <property name="connectionProperties">
            <props>
                <prop
key="phoenix.functions.allowUserDefinedFunctions">true</prop>
            </props>
        </property>

    </bean>

any idea why?

thanks in advance
Cruz

Mime
View raw message