Uploaded image for project: 'EXASOL Roadmap'
  1. EXASOL Roadmap
  2. EXASOL-1922

JDBC: return suitable data types



    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: EXASOL 6.0.0
    • Component/s: None
    • Category 1:
      ETL / Data Integration
    • Category 2:
      ETL / Data Integration - Virtual Schema
    • Changed Behavior:
      The column data types returned by ResultSetMetadata of the EXASOL JDBC driver are now more accurate and thus have changed in certain scenarios. See issue description for more details.


      Currently, if a column is of type DECIMAL(x,0), the jdbc driver will return DECIMAL as type, no matter how small x is. So if a user defined a table like CREATE TABLE T (TINYINT a) and you run a SELECT * FROM T via jdbc, you will get an BigDecimal, which is very slow in Java.
      Furthermore, if you run our own IMPORT FROM JDBC to read data from a remote EXASolution database, you will get all decimal values as VARCHAR, because our decimal type is too small to fit java's BigDecimal.

      Important note

      In the class ResultSetMetadata of the EXASOL JDBC driver the user can determine the column data type using the getColumnType() function. In some cases the returned types are different from the types returned in previous versions. For decimal columns with scale 0 and precision <=18 we will return now the best matching integer type: smallint, int or bigint.

      Furthermore the types of an IMPORT FROM JDBC statement change in some cases as well compared to previous versions. This is especially the case in case of a CREATE TABLE AS SELECT * FROM (IMPORT FROM JDBC ...) statement.




            CaptainEXA Captain EXASOL
            CaptainEXA Captain EXASOL
            0 Vote for this issue
            0 Start watching this issue