Repository navigation
Description
The new feature in 21.1.2.15 is supporting the Map DataType.
But when I am coding by using clickhouse-jdbc-0.25.jar, it has a error.
ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 26, host: 127.0.0.1, port: 8123; Code: 26, e.displayText() = DB::ParsingException: Cannot parse quoted string: expected opening quote ''', got 'a'{}: while converting '{a=b, c=d}' to Map(String,String): at row 0 (version 21.1.2.15 (official build))
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:58)
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:28)
at ru.yandex.clickhouse.ClickHouseStatementImpl.checkForErrorAndThrow(ClickHouseStatementImpl.java:876)
at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:616)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:117)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:100)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:95)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:90)
at ru.yandex.clickhouse.ClickHouseStatementImpl.execute(ClickHouseStatementImpl.java:226)
at ru.yandex.clickhouse.ClickHousePreparedStatementImpl.execute(ClickHousePreparedStatementImpl.java:108)
at com.example.demo.Demo2Application.exeInsertSQL(Demo2Application.java:35)
at com.example.demo.Demo2Application.main(Demo2Application.java:16)
Caused by: java.lang.Throwable: Code: 26, e.displayText() = DB::ParsingException: Cannot parse quoted string: expected opening quote ''', got 'a'{}: while converting '{a=b, c=d}' to Map(String,String): at row 0 (version 21.1.2.15 (official build))
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:53)
... 11 more
My Table Schema is :
CREATE TABLE default.tb2
(
id Int32,
name String,
grade Map(String, String)
)
ENGINE = MergeTree
ORDER BY id
SETTINGS index_granularity = 8192;
Activity
spz0507 commentedon Feb 2, 2021
My Code is :
spz0507 commentedon Feb 2, 2021
Could anyone can give some advice?