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 2017/07/16 14:06:00 UTC

[jira] [Assigned] (DERBY-6512) Cannot use java.util.Arrays.toString( byte[] b ) as a function.

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

Rick Hillegas reassigned DERBY-6512:
------------------------------------

    Assignee: Dinuka Kodithuwakku

> Cannot use java.util.Arrays.toString( byte[] b ) as a function.
> ---------------------------------------------------------------
>
>                 Key: DERBY-6512
>                 URL: https://issues.apache.org/jira/browse/DERBY-6512
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.1.1
>            Reporter: Rick Hillegas
>            Assignee: Dinuka Kodithuwakku
>            Priority: Minor
>
> Trying to use this method as a function raises the following error, which seems to be a defect in Derby's method resolution:
> ERROR 42X73: Method resolution for signature java.util.Arrays.toString([B) was ambiguous. (No single maximally specific method.)
> I can create a separate static method in another class, which just forwards to java.util.Arrays.toString(). Registering and invoking that method as a toString() function works.
> The following script shows this problem:
> connect 'jdbc:derby:memory:db;create=true';
> create function mb( cells int... ) returns char( 5 ) for bit data
> language java parameter style derby deterministic no sql
> external name 'org.apache.derbyTesting.functionTests.tests.lang.MergeStatementTest.makeByteArray';
> create function toString( byteArray char( 5 ) for bit data ) returns varchar( 20 )
> language java parameter style java deterministic no sql
> external name 'java.util.Arrays.toString';
> values( toString( mb( 1, 2, 3, 4, 5 ) ) );



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)