Added getting arrays of objects and other types of arrays#2747
Merged
Added getting arrays of objects and other types of arrays#2747
Conversation
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
...nt-v2/src/main/java/com/clickhouse/client/api/data_formats/ClickHouseBinaryFormatReader.java
Outdated
Show resolved
Hide resolved
…sue with double[] and float[]
|
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/BinaryStreamReader.java
Show resolved
Hide resolved
mzitnik
approved these changes
Feb 19, 2026
Contributor
mzitnik
left a comment
There was a problem hiding this comment.
Thanks for the extra fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
getObjectArrayto getObject[]Array(Tuple())Closes #2738
Docs: ClickHouse/clickhouse-docs#5551
Checklist
Delete items not relevant to your PR:
Note
Medium Risk
Touches core RowBinary array decoding and adds new array accessors, which could affect how existing array columns (especially empty and enum arrays) are materialized and what exceptions are thrown.
Overview
Adds a new
getObjectArray()API toClickHouseBinaryFormatReaderandGenericRecord(and wires it throughAbstractBinaryFormatReader,MapBackedRecord, andBinaryReaderBackedRecord) to read Array columns asObject[], including recursive conversion for nested arrays and support for non-primitive element types.Improves array decoding and convenience accessors:
getStringArray()now also supportsArray(Enum*)by returning enum names, empty arrays preserve an appropriate element type, andBinaryStreamReaderbetter infers primitive element types (includingfloat/double) plus adds recursiveArrayValue.toObjectArray().Adds extensive unit and integration coverage for 1D/2D/3D arrays, empty arrays, nullable elements, list-backed array decoding via type hints, and error conditions when calling array methods on non-array columns.
Written by Cursor Bugbot for commit 4999fdd. This will update automatically on new commits. Configure here.