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 "Jeremy Boynes (JIRA)" <de...@db.apache.org> on 2004/12/06 02:21:20 UTC
[jira] Created: (DERBY-89) Support Java Signature in procedure declaration
Support Java Signature in procedure declaration
-----------------------------------------------
Key: DERBY-89
URL: http://nagoya.apache.org/jira/browse/DERBY-89
Project: Derby
Type: New Feature
Components: SQL
Reporter: Jeremy Boynes
Attachments: derby_java_signature.patch
Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-89) Support Java Signature in procedure declaration
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-89?page=comments#action_57481 ]
Daniel John Debrunner commented on DERBY-89:
--------------------------------------------
Patch applied. Feature needs more work to be complete, e.g.
Error checking of invalid java type conversions (e.g. INT to java.util.Hashtable)
Possibly move signature into parser to be validated is of correct type.
Upgrade issues.
Sending java/engine/build.xml
Sending java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
Sending java/engine/org/apache/derby/impl/build.xml
Sending java/engine/org/apache/derby/impl/io/build.xml
Sending java/engine/org/apache/derby/impl/services/build.xml
Sending java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
Sending java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
Sending java/testing/org/apache/derbyTesting/functionTests/master/procedure.out
Sending java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java
Sending java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
Transmitting file data ..........
Committed revision 124819.
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: http://issues.apache.org/jira/browse/DERBY-89
> Project: Derby
> Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467353 ]
Øystein Grøvlen commented on DERBY-89:
--------------------------------------
Can this be closed?
Seems like Dan addressed at least some of hi concerns in DERBY-258 (check for invalid type conversions).
Is there more that needs to be done?
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: https://issues.apache.org/jira/browse/DERBY-89
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Assigned To: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Jeremy Boynes <jb...@apache.org>.
Daniel John Debrunner wrote:
> Jeremy Boynes wrote:
>
> I got the patch to work on a linux box and am running tests now.
>
Yea! If there is anything I can do please let me know.
--
Jeremy
Re: [jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Daniel John Debrunner <dj...@debrunners.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Boynes wrote:
> Jeremy Boynes wrote:
>
>> I just tried again with no problems - can you jump on IRC or Yahoo so
>> we can try and figure this out?
>>
>
> I have not heard anything from Dan and this issue has been dragging on
> for over three weeks now.
I got the patch to work on a linux box and am running tests now.
Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFB0vhbIv0S4qsbfuQRAvROAKCb+ez89CNwnEPKOPvyc9mVl8wx3gCfe1xM
zzrMCBvI98vnBt61ddBpBc8=
=YoQC
-----END PGP SIGNATURE-----
Re: [jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Jeremy Boynes <jb...@apache.org>.
Jeremy Boynes wrote:
> I just tried again with no problems - can you jump on IRC or Yahoo so we
> can try and figure this out?
>
I have not heard anything from Dan and this issue has been dragging on
for over three weeks now.
Is there another committer able/willing to review the patch and provide
feedback?
--
Jeremy
Re: [jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Jeremy Boynes <jb...@gluecode.com>.
I just tried again with no problems - can you jump on IRC or Yahoo so we
can try and figure this out?
--
Jeremy
Daniel John Debrunner wrote:
> Jeremy Boynes (JIRA) wrote:
>
>
>>> [
>
> http://nagoya.apache.org/jira/browse/DERBY-89?page=comments#action_56842 ]
>
>>>Jeremy Boynes commented on DERBY-89:
>>>------------------------------------
>>>
>>>I applied the patch to a fresh checkout and it built OK. The method
>
> being referenced is included in the patch (starting at line 177). Could
> you have had an patching ClassInspector.java?
>
>
> I'm still getting errors compiling but I see that only part of the patch
> is applied to ClassInspector. Just the imports are added. I got no
> errors though when I applied the patch.
>
> patching file
> `java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java'
> patching file
> `java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java'
> patching file
> `java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java'
> patching file
> `java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java'
> patching file
> `java/testing/org/apache/derbyTesting/functionTests/master/procedure.out'
> patching file
> `java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java'
>
>
> Dan.
Re: [jira] Commented: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Daniel John Debrunner <dj...@debrunners.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Boynes (JIRA) wrote:
> [
http://nagoya.apache.org/jira/browse/DERBY-89?page=comments#action_56842 ]
>
> Jeremy Boynes commented on DERBY-89:
> ------------------------------------
>
> I applied the patch to a fresh checkout and it built OK. The method
being referenced is included in the patch (starting at line 177). Could
you have had an patching ClassInspector.java?
I'm still getting errors compiling but I see that only part of the patch
is applied to ClassInspector. Just the imports are added. I got no
errors though when I applied the patch.
patching file
`java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java'
patching file
`java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java'
patching file
`java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java'
patching file
`java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java'
patching file
`java/testing/org/apache/derbyTesting/functionTests/master/procedure.out'
patching file
`java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java'
Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFB0alnIv0S4qsbfuQRAnS4AKDXAebpdWXTycDLrHJKLbZXMpUn5QCfUig4
YDWyjNPXeYgBlbiVGHmw3ds=
=DZup
-----END PGP SIGNATURE-----
[jira] Commented: (DERBY-89) Support Java Signature in procedure declaration
Posted by "Jeremy Boynes (JIRA)" <de...@db.apache.org>.
[ http://nagoya.apache.org/jira/browse/DERBY-89?page=comments#action_56842 ]
Jeremy Boynes commented on DERBY-89:
------------------------------------
I applied the patch to a fresh checkout and it built OK. The method being referenced is included in the patch (starting at line 177). Could you have had an patching ClassInspector.java?
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: http://nagoya.apache.org/jira/browse/DERBY-89
> Project: Derby
> Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Assigned: (DERBY-89) Support Java Signature in procedure declaration
Posted by "Jeremy Boynes (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-89?page=history ]
Jeremy Boynes reassigned DERBY-89:
----------------------------------
Assign To: Jeremy Boynes
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: http://issues.apache.org/jira/browse/DERBY-89
> Project: Derby
> Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Assignee: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-89) Support Java Signature in procedure
declaration
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner closed DERBY-89.
--------------------------------------
Resolution: Fixed
Fix Version/s: 10.1.1.0
Believe all issues are addressed. Will enter a separate documentation issue.
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: https://issues.apache.org/jira/browse/DERBY-89
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Assigned To: Jeremy Boynes
> Fix For: 10.1.1.0
>
> Attachments: derby_java_signature.patch
>
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Updated: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Daniel John Debrunner <dj...@debrunners.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Boynes wrote:
> Daniel John Debrunner wrote:
>
>> Jeremy Boynes (JIRA) wrote:
>>
>>>>
>>>> Patch that supports Java signature in the external name provided they
>>
>>
>> Jeremy, any idea what happens with your patch if the incorrect type is
>> specified for a parameter, e.g. java.lang.String for a SQL INTEGER?
>> Assuming there is such a method.
>>
>
> If the value passed to CallableStatement.setString() can be converted to
> a numeric value then it is passed through; if it is not then you get:
>
> ERROR 22018: Invalid character string format for type INTEGER.
>
> This appears consistent with trying to insert a string value into an
> integer column.
I don't think that's what I meant. I should have been clearer.
If you create a procedure with a method signature that contains an
incorrect Java type for the SQL procedure parameter, what happens?
Example, see the Map type in the java signature here.
create procedure ambigious03(p1 INTEGER, p2 INTEGER)
language java parameter style java
external name
'org.apache.derbyTesting.functionTests.util.ProcedureTest.ambigious2(int,java.util.Map)
I think from a quick reading of the SQL standard part 13 that such a
method signature should not lead to a successful method resolution,
since INTEGER is not type mappable to java.util.Map, even if such a
method exists.
Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBtyQ9Iv0S4qsbfuQRArRPAJ9tuSDz/zToVGZ61Kk0anDr84t0BwCbB+4M
OTjc7Flw4OCPgwT7JT4I4jg=
=lzqB
-----END PGP SIGNATURE-----
Re: [jira] Updated: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Jeremy Boynes <jb...@gluecode.com>.
Daniel John Debrunner wrote:
> Jeremy Boynes (JIRA) wrote:
>>>
>>>Patch that supports Java signature in the external name provided they
>
> Jeremy, any idea what happens with your patch if the incorrect type is
> specified for a parameter, e.g. java.lang.String for a SQL INTEGER?
> Assuming there is such a method.
>
If the value passed to CallableStatement.setString() can be converted to
a numeric value then it is passed through; if it is not then you get:
ERROR 22018: Invalid character string format for type INTEGER.
This appears consistent with trying to insert a string value into an
integer column.
--
Jeremy
Re: [jira] Updated: (DERBY-89) Support Java Signature in procedure
declaration
Posted by Daniel John Debrunner <dj...@debrunners.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Boynes (JIRA) wrote:
> [ http://nagoya.apache.org/jira/browse/DERBY-89?page=history ]
>
> Jeremy Boynes updated DERBY-89:
> -------------------------------
>
> Attachment: derby_java_signature.patch
>
> Patch that supports Java signature in the external name provided they
are mostly valid and do not contain whitesapace. For example
>
> create procedure ambigious03(p1 INTEGER, p2 INTEGER)
> language java parameter style java
> external name
'org.apache.derbyTesting.functionTests.util.ProcedureTest.ambigious2(int,java.lang.Integer)
Jeremy, any idea what happens with your patch if the incorrect type is
specified for a parameter, e.g. java.lang.String for a SQL INTEGER?
Assuming there is such a method.
Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBtxZJIv0S4qsbfuQRAicOAKCOWzNC9FomLb/OzMdPoxmVY4o72QCguftg
xKO6C6ry33bn8jytH3F+icg=
=WH/T
-----END PGP SIGNATURE-----
[jira] Updated: (DERBY-89) Support Java Signature in procedure declaration
Posted by "Jeremy Boynes (JIRA)" <de...@db.apache.org>.
[ http://nagoya.apache.org/jira/browse/DERBY-89?page=history ]
Jeremy Boynes updated DERBY-89:
-------------------------------
Attachment: derby_java_signature.patch
Patch that supports Java signature in the external name provided they are mostly valid and do not contain whitesapace. For example
create procedure ambigious03(p1 INTEGER, p2 INTEGER)
language java parameter style java
external name 'org.apache.derbyTesting.functionTests.util.ProcedureTest.ambigious2(int,java.lang.Integer)
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: http://nagoya.apache.org/jira/browse/DERBY-89
> Project: Derby
> Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-89) Support Java Signature in procedure declaration
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://nagoya.apache.org/jira/browse/DERBY-89?page=comments#action_56809 ]
Daniel John Debrunner commented on DERBY-89:
--------------------------------------------
I got this error compiling after applying this patch.
[javac] Found 1 semantic error compiling "C:/work/p4/os/opensource/java/engi
ne/org/apache/derby/impl/sql/compile/MethodCallNode.java":
[javac] 687. method = classInspector.findPublicMethod(jav
aClassName, methodName, staticMethod);
[javac] <----------------------------------
------------------------------------>
[javac] *** Error: No match was found for method "findPublicMethod(java.lang
.String, java.lang.String, boolean)".
> Support Java Signature in procedure declaration
> -----------------------------------------------
>
> Key: DERBY-89
> URL: http://nagoya.apache.org/jira/browse/DERBY-89
> Project: Derby
> Type: New Feature
> Components: SQL
> Reporter: Jeremy Boynes
> Attachments: derby_java_signature.patch
>
> Derby cannot resolve procedures to methods when the Java signature determined from the SQL declaration is ambiguous. SQL-03 Part 13 allows a Java signature to be supplied in the SQL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira