fix: ensure nullable binary arrays return boxed type arrays instead of Object[]#2920
fix: ensure nullable binary arrays return boxed type arrays instead of Object[]#2920kishansinghifs1 wants to merge 1 commit into
Conversation
|
Repository collaborators can run the JMH benchmark suite against this PR by commenting: Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%): Only one benchmark run per PR is active at a time — issuing a new |
…f Object[] in BinaryStreamReader
|
Thank you for the contribution! I will review next week. |
24530a7 to
8d13865
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 8d13865. Configure here.
| ArrayValue array; | ||
| if (itemTypeColumn.isNullable() | ||
| || itemTypeColumn.getDataType() == ClickHouseDataType.Variant | ||
| if (itemTypeColumn.isNullable()) { |
There was a problem hiding this comment.
Empty nullable array typing
Medium Severity
When a nullable array has length zero, readArray still uses getPrimitiveClass (e.g. double for Float64) instead of the boxed types used in readArrayItem. The same column can yield primitive empty arrays but boxed non-empty arrays.
Reviewed by Cursor Bugbot for commit 8d13865. Configure here.
|
Hiii @chernser, |


Summary
BinaryStreamReader.readArrayItem used Object.class as the element type for all nullable array columns, so Array(Nullable(Float64)) returned Object[] instead of Double[]. This splits the nullable check from the Variant/Dynamic/Geometry fallback and derives the correct boxed wrapper class via getObjectClass(). Added unit test to verify the component type is Double.class for Array(Nullable(Float64)).
Closes : #2846
Checklist
Delete items not relevant to your PR: