Skip to content

Unsupported data type: JSON #1023

Closed
Closed
@aarcha123

Description

@aarcha123

Using the below snippet results in "Unsupported data type: JSON:" using 0.3.2.patch11

PreparedStatement pstmt = connection.prepareStatement("INSERT INTO json_demo SELECT id,details from INPUT('id UInt8, details JSON')"); `
    pstmt.setInt(1, 20);
pstmt.setObject(2, "{\"type\": \"Region\"}");
pstmt.addBatch();
pstmt.executeBatch();

Table definition

CREATE TABLE json_demo
( id UInt8,
details JSON)
ENGINE = MergeTree()
PRIMARY KEY (id)

Stack trace:

Exception in thread "main" java.lang.IllegalArgumentException: Unsupported data type: JSON
	at com.clickhouse.client.data.ClickHouseRowBinaryProcessor$MappedFunctions.serialize(ClickHouseRowBinaryProcessor.java:484)
	at com.clickhouse.jdbc.internal.InputBasedPreparedStatement.addBatch(InputBasedPreparedStatement.java:333)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions