ClickHouse / ClickHouse/clickhouse-java

Add option to register custom class serializers

Open
#2,291 1 comment 0 reactions 0 assignees View on GitHub
client-api-v2 enhancement
Dominant language
Java
Stars
1.6k
Forks
636
Avg merge
2d 23h
Merged PRs (30d)
29

Description

### Use case
Want to insert data structured as List> without having to covert every row to a dto object and provide getters.
This kind of structure typically comes from query resultset, csv parser, apache camel exchange etc. The map is of column name to value.

### Describe the solution you'd like
Be able to register a class serializer for Map with POJOSerializers which calls Map.get("column") with the appropriate cast.
Alternatively add built in serializer option that handles List> type
Or possibly have the register method detect get(column-name) methods as valid serialization methods

also allow java record getter methods (which don't start with "get") to act as serialization methods

Contributor guide

Open the contributing guide

Research direction

Start by reading POJOSerializers and its register method, then compare the requested Map.get("column") handling with support for Java record getter methods. The issue offers several alternative designs, so done first requires choosing and specifying one serialization behavior before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.