fixed issue converting multidimensional lists and arrays#2735
Merged
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
|
Contributor
Author
|
/cursor review |
There was a problem hiding this comment.
Pull request overview
Improves handling and test coverage for converting multidimensional lists/arrays (particularly nested arrays) and validates string/object/list representations in both JDBC and client modules.
Changes:
- Updates internal conversion logic to track nesting depth explicitly during multidimensional conversions.
- Expands integration tests for nested arrays across multiple element types and dimensions.
- Adds an additional JDBC assertion for retrieving a deep nested array via
ResultSet.getArray().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| jdbc-v2/src/test/java/com/clickhouse/jdbc/JdbcDataTypeTests.java | Adds an assertion for getArray() on deep nested arrays (but removes the explanatory issue comment). |
| jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcUtils.java | Refactors multidimensional conversion to use an explicit depth field instead of computing remaining dimensions from stack size. |
| client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java | Adds integration coverage for nested array types validating getString(), getObject(), and getList(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jdbc-v2/src/test/java/com/clickhouse/jdbc/JdbcDataTypeTests.java
Outdated
Show resolved
Hide resolved
client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java
Outdated
Show resolved
Hide resolved
kurnoolsaketh
approved these changes
Feb 13, 2026
kurnoolsaketh
left a comment
There was a problem hiding this comment.
two nits - please fix or dismiss them before you merge. Overall, algo looks correct - i understand it after stepping through an example in intellij 👍
|
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
Closes #2741
Checklist
Delete items not relevant to your PR:
Note
Medium Risk
Touches core JDBC array conversion logic; while well-covered by new unit/integration tests, regressions could affect result decoding for nested array columns.
Overview
Fixes JDBC conversion of multi-dimensional
List/array values into Java arrays by tracking remaining depth per cursor instead of inferring it from stack size, and by validating invalid dimension inputs and unexpected extra nesting (throwingIllegalArgumentException/IllegalStateException).Adds broader coverage for nested arrays: new client-v2 integration tests verify
GenericRecord.getString/getObject/getListbehavior across 2D–4D arrays (including strings and nullable elements), and JDBC tests extend nested-array coverage (includingResultSet.getArray()on 3D string arrays) plus unit assertions for the new error cases.Written by Cursor Bugbot for commit 6e22f09. This will update automatically on new commits. Configure here.