You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2013/01/10 21:44:12 UTC

[jira] [Updated] (DERBY-3069) Derby does not resolve functions bound to methods with varargs.

     [ https://issues.apache.org/jira/browse/DERBY-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-3069:
---------------------------------

    Attachment: derby-3069-08-aa-stringArrayTable.diff

Attaching derby-3069-08-aa-stringArrayTable.diff. This patch adds a VTI which I find useful for ad-hoc testing of VTIs. Committed at revision 1431623.

Here is the javadoc for the VTI:

    /**
     * <p>
     * This is a table function which creates a StringArrayVTI out of
     * a space separated list of column names, and a varargs of rows.
     * Each row is a space separated list of column values. Here is
     * a sample usage:
     * </p>
     *
     * <pre>
     * connect 'jdbc:derby:memory:db;create=true';
     * 
     * create function leftTable
     * (
     *     columnNames varchar( 32672 ),
     *     rowContents varchar( 32672 ) ...
     * )
     * returns table
     * (
     *     a   varchar( 5 ),
     *     b   varchar( 5 )
     * )
     * language java parameter style derby_jdbc_result_set no sql
     * external name 'org.apache.derbyTesting.functionTests.tests.lang.VarargsRoutines.stringArrayTable';
     * 
     * select * from table( leftTable( 'A B', 'APP T', 'APP S' ) ) l;
     * </pre>
     */


Touches the following file:

M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/VarargsRoutines.java

                
> Derby does not resolve functions bound to methods with varargs.
> ---------------------------------------------------------------
>
>                 Key: DERBY-3069
>                 URL: https://issues.apache.org/jira/browse/DERBY-3069
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>              Labels: derby_triage10_10
>         Attachments: derby-3069-01-varargs-aa.diff, derby-3069-01-varargs-ab.diff, derby-3069-02-backout.diff, derby-3069-03-aa-varargsSyntax.diff, derby-3069-03-ab-varargsSyntax.diff, derby-3069-04-aa-shortenRoutineNamesInUpgradeTest.diff, derby-3069-05-aa-executeVarargs.diff, derby-3069-06-ab-fixBugs.diff, derby-3069-07-aa-datatypeTests.diff, derby-3069-07-ab-datatypeTests.diff, derby-3069-08-aa-stringArrayTable.diff, Varargs.html, Varargs.html, z.java, z.sql
>
>
> Varargs were added in Java 5. It would be nice if Derby let you invoke a function bound to a method with a variable length argument list. The Reference Guide states a small number of restrictions for methods which can be invoked as Derby functions: They must be public, static, and not have arguments which are long datatypes. I see no reason that Derby shouldn't be able to resolve and invoke functions which are bound to methods which don't suffer these limitations but which have variable argument lists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira