[
https://issues.apache.org/jira/browse/TRAFODION-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Suresh Subbiah resolved TRAFODION-1007.
---------------------------------------
Resolution: Fixed
> LP Bug: 1421438 - UDF: showddl does not work for UDFs
> -----------------------------------------------------
>
> Key: TRAFODION-1007
> URL: https://issues.apache.org/jira/browse/TRAFODION-1007
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmu
> Reporter: Weishiun Tsai
> Assignee: Suresh Subbiah
> Fix For: 1.1 (pre-incubation)
>
>
> Showddl is supposed to be enhanced for supporting UDF. But it does not work
> right now, as shown below. This is seen on the v0210
> build installed on a workstation.
> To reproduce this problem:
> (1) Download the attached tar file and untar it to get the 4 files in there.
> Put the 4 files in any directory <mydir>
> (2) Run build.sh from <mydir> to build the UDF so file.
> (3) Change the line ‘create library qa_udf_lib file '<mydir>/myudf.so'; in
> mytest.sql and fill in <mydir>
> (4) From sqlci, obey mytest.sql
> -------------------------------------------
> >>obey mytest.sql;
> >>create schema mytest;
> --- SQL operation complete.
> >>set schema mytest;
> --- SQL operation complete.
> >>
> >>create library qa_udf_lib file '<mydir>/myudf.so';
> --- SQL operation complete.
> >>
> >>create function MYUDF
> +>(INVAL int)
> +>returns (OUTVAL int)
> +>language c
> +>parameter style sql
> +>external name 'myudf'
> +>library qa_udf_lib
> +>deterministic
> +>state area size 1024
> +>allow any parallelism
> +>no sql;
> --- SQL operation complete.
> >>
> >>create table mytable (a int, b int);
> --- SQL operation complete.
> >>insert into mytable values (1,1);
> --- 1 row(s) inserted.
> >>
> >>select myudf(a) from mytable;
> OUTVAL
> -----------
> 1
> --- 1 row(s) selected.
> >>
> >>showddl function myudf;
> *** ERROR[1389] Object MYUDF does not exist in Trafodion.
> *** ERROR[4082] Object TRAFODION.MYTEST.MYUDF does not exist or is
> inaccessible.
> --- SQL operation failed with errors.
> >>showddl myudf;
> *** ERROR[1389] Object MYUDF does not exist in Trafodion.
> *** ERROR[4082] Object TRAFODION.MYTEST.MYUDF does not exist or is
> inaccessible.
> --- SQL operation failed with errors.
> >>showddl schema mytest;
> CREATE PRIVATE SCHEMA "TRAFODION"."MYTEST" AUTHORIZATION "DB__ROOT";
> --- SQL operation complete.
> >>get functions;
> Functions in Schema TRAFODION.MYTEST
> ====================================
> MYUDF
> --- SQL operation complete.
> >>
> >>drop schema mytest cascade;
> --- SQL operation complete.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)