Skip to content

using resultSet.getArray on a map column fails with a conversion error #2621

@troyjcurt

Description

@troyjcurt

Description

Steps to reproduce

  1. create a table with a map column
  2. query for that data and get the result set
  3. use resultSet.getArray(mapColumnName)

Error Log or Exception StackTrace

Caused by: java.sql.SQLException: Unsupported conversion from java.util.LinkedHashMap to java.sql.Array                                                           
        at com.clickhouse.jdbc.internal.JdbcUtils.convert(JdbcUtils.java:298)                                                                                     
        at com.clickhouse.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:1454)                                                                                   
        at com.clickhouse.jdbc.ResultSetImpl.getArray(ResultSetImpl.java:1006)                                                                                    
        at com.zaxxer.hikari.pool.HikariProxyResultSet.getArray(HikariProxyResultSet.java) 

Expected Behaviour

the map column is successfully converted into an array when the function is called

Environment

  • Client version: jdbc 0.9.2
  • Language version: java 17
  • OS: RHEL

ClickHouse Server

  • ClickHouse Server version: 25.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions