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
clientModule: the client (client-v2; with legacy: the v1 client)data-typesArea: type names, value encoding and decoding, row mapping, data formatsenhancement
The POJO serializer cannot serialize nested custom objects when using ClickHouse Nested data types. It expects flattened List fields matching the flattened column names but doesn't traverse nested object graphs.
Steps to reproduce
Create a POJO with a nested custom object field (e.g., Address address)
Define ClickHouse table with Nested type (e.g., address Nested(street String, city String))
[main] INFO com.clickhouse.examples.client_v2.POJO2DbWriter - Table initialized. Registering class.
[main] WARN com.clickhouse.client.api.serde.POJOSerDe - No getter method found for column: addressstreet
[main] WARN com.clickhouse.client.api.serde.POJOSerDe - No setter method found for column: addressstreet
[main] WARN com.clickhouse.client.api.serde.POJOSerDe - No getter method found for column: addresscity
[main] WARN com.clickhouse.client.api.serde.POJOSerDe - No setter method found for column: addresscity
Exception in thread "main" java.lang.IllegalArgumentException: No serializer found for column 'address.street'. Did you forget to register it?
at com.clickhouse.client.api.Client.insert(Client.java:1238)
at com.clickhouse.examples.client_v2.POJO2DbWriter.flush(POJO2DbWriter.java:94)
at com.clickhouse.examples.client_v2.POJO2DbWriter.submit(POJO2DbWriter.java:89)
at com.clickhouse.examples.client_v2.Main.main(Main.java:59)
Expected Behaviour
POJO serializer should traverse nested object graphs and call getAddress().getStreet() when encountering nested custom objects.
Recommendation: Keep open — maintainer decision
The next step is a design decision: map a nested object of the POJO to a Nested column in POJOSerDe, or add custom serializers (the option in the maintainer comment).
Status on main: Not supported on main — a run on main (8480ca001), ClickHouse 26.11.2.4, gives the error of the issue for a getter getAddress() that returns an object. With flatten_nested = 0, a getter that returns a List of such objects fails with Cannot serialize Repro$Address@… as a tuple.
Breaking change: No — can be done without a break.
Workaround: One List getter for each flattened column (getAddressStreet() and getAddressCity(), each a List<String>) inserts the row; the same run shows it.
Analysis:POJOSerDe.java:57-70 maps each table column to one getter by its normalized name (address.street becomes addressstreet, DefaultColumnToMethodMatchingStrategy.java:56), and does not read the properties of a returned object. For an un-flattened Nested column, SerializerUtils.java:625 accepts only tuple values (a List or an array), as docs/features.md says.
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
chernser commentedon Jan 12, 2026
Good day, @bk-mz !
Thank you for reporting!
We will see how it can be implemented. The fastest way would be adding customer serializers.
polyglotAI-bot commentedon Nov 28, 2026
Recommendation: Keep open — maintainer decision
The next step is a design decision: map a nested object of the POJO to a
Nestedcolumn inPOJOSerDe, or add custom serializers (the option in the maintainer comment).main: Not supported on main — a run onmain(8480ca001), ClickHouse 26.11.2.4, gives the error of the issue for a gettergetAddress()that returns an object. Withflatten_nested = 0, a getter that returns aListof such objects fails withCannot serialize Repro$Address@… as a tuple.Listgetter for each flattened column (getAddressStreet()andgetAddressCity(), each aList<String>) inserts the row; the same run shows it.Analysis:
POJOSerDe.java:57-70maps each table column to one getter by its normalized name (address.streetbecomesaddressstreet,DefaultColumnToMethodMatchingStrategy.java:56), and does not read the properties of a returned object. For an un-flattenedNestedcolumn,SerializerUtils.java:625accepts only tuple values (aListor an array), asdocs/features.mdsays.Automated triage by Polyglot AI. A maintainer makes the final decision.