How to get unsigned type information in JDBC driver version >= 1.1.0

singlestore-jdbc-client 1.0.1 returned full type name (e.g. TINYINT(3) UNSIGNED) in case of unsigned types via java.sql.DatabaseMetaData#getColumns, but 1.1.0 returns just TINYINT. I tried com.singlestore.jdbc.client.result.ResultSetMetaData#isSigned, but it returns true even for unsigned types. What’s the recommended way to get such information in version 1.1.0?

Hi @yuya.ebihara,
Welcome to SingleStore forums! Thanks for your post.
This is a known issue that we’re working on and should have a patch release resolving it soon.

1 Like

Hi @yuya.ebihara,
Thank you again for your post.
Regarding com.singlestore.jdbc.client.result.ResultSetMetaData#isSigned returning incorrect results, could you please provide the following:

  • whether you are using managed service or self-hosted
  • your SingleStore version
  • the DDL for the table you are querying (you can use "SHOW CREATE TABLE " to get it)
  • the java snippet that returns incorrect results

This would help a lot with fixing this issue.
Kind regards,

Sorry, please forget about isSigned. I was checking the result of DatabaseMetaData.getColumns.
Just confirmed the method returns correct result.

I still hope DatabaseMetaData.getColumns will be improved to include signed information.

Great to hear that isSigned is not an issue. As @jprice said, the getColumns issue is a known one and the fix will be in the upcoming release.

1 Like