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] Commented: (DERBY-3069) Derby does not resolve functions bound to methods with varargs.
Date Wed, 12 Sep 2007 18:34:32 GMT

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

Rick Hillegas commented on DERBY-3069:

Thanks for the reference to The Java Language Specification, Second Edition late in Part 13,
Section 8.6. That section seems to indicate that the Java method resolution rules are to be
applied to isolate a set of candidate methods after the types of the arguments have been mapped
from SQL types to Java types. The sentence in section 4.2.2 which leapt out at me was this:
"If the instance SQL-invoked method is an external Java routine, the term "set of overriding
methods" is not applicable; for such methods, the capabilities provided by overriding methods
duplicate Java's own mechanisms and the subject routine executed is the one that would be
invoked when no overriding methods are specified."

The CREATE FUNCTION section is vague about how Derby will resolve methods at run-time. Where
is this documented?

The varargs information must be propagated to the classfile. It can be retrieved via reflection
by calling Method.isVarArgs().

> 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:,,,,,,,
>            Reporter: Rick Hillegas
>         Attachments: 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.

View raw message