Skip to content

[jdbc-v2] Make Driver type system more compatible with JDBC standard types #2746

@chernser

Description

@chernser

Description

Some DB tools use java.sql.Array#getBaseTypeName and java.sql.Array#getBaseType to determine what array element type is. And there is a difference between V1 and V2:

  • java.sql.Array#getBaseTypeName in V1 returns simple type like Tuple, Nested . V2 returns column definition instead Tuple(Int32, String). It was done to provide more details.

  • java.sql.Array#getBaseType in V1 returns 2002 what matches STRUCT type. V2 returns 1111 what matches OTHER meaning this is DB specific type with no match to JDBC one.

Now the problem is - how to make ClickHouse datatypes more JDBC compatible. Using only java.sql.Array#getBaseType would simplify thing. If driver returns java.sql.Types#OTHER then however application should get more information about type.

This issue is for:

  • Review V2 behavior and fix Tuple/Nested if possible.
  • Define problem and discuss it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:jdbc-metadataissue handling metadata things like getting type of columnjdbc-v2jdbc-v2 issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions