[ 
https://issues.apache.org/jira/browse/DERBY-6840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14991141#comment-14991141
 ] 

Rick Hillegas commented on DERBY-6840:
--------------------------------------

The javadoc for DatabaseMetaData.getBestRowIdentifier() says that the Java 
object type of the DECIMAL_DIGITS column is Short. The corresponding JDBC type 
is SMALLINT according to the datatype mapping table in appendix B.4 of the JDBC 
4.2 specification. But due to a curious type mapping asymmetry, the reverse 
mapping from JDBC SMALLINT to Java object type is Integer, according to 
appendix B.3 of the JDBC 4.2 specification. That is why you see this odd 
behavior. There is no JDBC type which maps to Short according to appendix B.3.

Thanks,
-Rick

> DatabaseMetaData.getBestRowIdentifier/DECIMAL_DIGITS' type is Integer
> ---------------------------------------------------------------------
>
>                 Key: DERBY-6840
>                 URL: https://issues.apache.org/jira/browse/DERBY-6840
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.12.1.1
>            Reporter: Jin Kwon
>            Priority: Trivial
>
> The value of {{DECIMAL_DIGITS}} of {{DatabaseMetaData.getBestRowIdentifier}} 
> is an {{java.lang.Integer}} not {{java.lang.Short}}. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to