Rick Hillegas created DERBY-6512:
------------------------------------

             Summary: 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.0.0
            Reporter: Rick Hillegas
            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.2#6252)

Reply via email to