You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add option to register custom class serializers #2291
clientModule: the client (client-v2; with legacy: the v1 client)data-typesArea: type names, value encoding and decoding, row mapping, data formatsenhancement
Want to insert data structured as List<Map<String, Object>> 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<Map<String, ?>> 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
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!
Recommendation: Keep open — maintainer decision main has none of the three requests: no API to register a serializer for a class, no insert of Map rows with Client.insert(String, List), and record accessors map only with a custom ColumnToMethodMatchingStrategy. A maintainer decides which one to build.
Status on main: Not supported on main — a HashMap row, and a record with the default strategy, fail with "No serializer found for column 'id'"; a record with a custom strategy inserts. Run on 8480ca001, ClickHouse 26.11.4.11.
Breaking change: No — can be done without a break, as new API.
Duplicates / related: None found
Workaround: For records, use Client.Builder.columnToMethodMatchingStrategy(new DefaultColumnToMethodMatchingStrategy("^(?!set).+", "^(set).+", "^(get|set|is|has)|_", "[-_.]")): the run inserts records with it.
Analysis:POJOSerDe.registerClass (POJOSerDe.java:44-52) takes only the methods that the matching strategy calls getters, and the default strategy accepts only names that start with get, is, or has (DefaultColumnToMethodMatchingStrategy.java:29). Client.insert(String, List) finds the serializers by the class of the first element (Client.java:1599), so a Map has no serializer for its keys.
Automated triage by Polyglot AI. A maintainer makes the final decision.
clientModule: the client (client-v2; with legacy: the v1 client)data-typesArea: type names, value encoding and decoding, row mapping, data formatsenhancement
Activity
github-actions commentedon Apr 9, 2026
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!
polyglotAI-bot commentedon Nov 28, 2026
Recommendation: Keep open — maintainer decision
mainhas none of the three requests: no API to register a serializer for a class, no insert ofMaprows withClient.insert(String, List), and record accessors map only with a customColumnToMethodMatchingStrategy. A maintainer decides which one to build.main: Not supported on main — aHashMaprow, and a record with the default strategy, fail with "No serializer found for column 'id'"; a record with a custom strategy inserts. Run on8480ca001, ClickHouse 26.11.4.11.Client.Builder.columnToMethodMatchingStrategy(new DefaultColumnToMethodMatchingStrategy("^(?!set).+", "^(set).+", "^(get|set|is|has)|_", "[-_.]")): the run inserts records with it.Analysis:
POJOSerDe.registerClass(POJOSerDe.java:44-52) takes only the methods that the matching strategy calls getters, and the default strategy accepts only names that start withget,is, orhas(DefaultColumnToMethodMatchingStrategy.java:29).Client.insert(String, List)finds the serializers by the class of the first element (Client.java:1599), so aMaphas no serializer for its keys.Automated triage by Polyglot AI. A maintainer makes the final decision.