db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3069) Derby does not resolve functions bound to methods with varargs.
Date Mon, 17 Sep 2007 12:57:56 GMT

     [ 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-01-varargs-aa.diff

Attaching derby-3069-01-aa.diff. This allows you to run functions which are bound to methods
which have vararg signatures. Touches the following files:

M      java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java

This is the compile-time bind() logic. This allows you to resolve function declarations against
methods which have vararg signatures. This also exposes helper methods for determining whether
a method has a vararg signature.


M      java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
M      java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java

This is the compile-time generate() piece, which generates the byte code needed to invoke
varags methods. For varargs signatures, this method builds a concluding array argument and
stuffs it with the trailing arguments specified by the user.



> 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
>         Attachments: derby-3069-01-varargs-aa.diff, 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message