Commit 0da71d8
committed
Fix client-v2 RowBinary: write Nullable marker for nested Tuple/Map elements
A Nullable element nested inside a Tuple or Map was serialized without its
leading null-marker byte for present (non-null) values, corrupting the
RowBinary stream so the server (and the client's own reader) mis-parsed the
following bytes. Top-level columns get the marker from writeValuePreamble and
serializeArrayData already wrote per-element markers, but serializeTupleData
and serializeMapData called serializeData directly and skipped it.
Add a serializeNestedData helper that writes the 0x00 (present) / 0x01 (null)
marker for nested Nullable elements, and route Tuple elements and Map values
through it. The array and top-level paths are unchanged.
Fixes: #27211 parent 51c7955 commit 0da71d8
2 files changed
Lines changed: 92 additions & 3 deletions
File tree
- client-v2/src
- main/java/com/clickhouse/client/api/data_formats/internal
- test/java/com/clickhouse/client/api/data_formats/internal
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
114 | 133 | | |
115 | 134 | | |
116 | 135 | | |
| |||
460 | 479 | | |
461 | 480 | | |
462 | 481 | | |
463 | | - | |
| 482 | + | |
464 | 483 | | |
465 | 484 | | |
466 | 485 | | |
467 | 486 | | |
468 | | - | |
| 487 | + | |
469 | 488 | | |
470 | 489 | | |
471 | 490 | | |
| |||
483 | 502 | | |
484 | 503 | | |
485 | 504 | | |
486 | | - | |
| 505 | + | |
487 | 506 | | |
488 | 507 | | |
489 | 508 | | |
| |||
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
137 | 207 | | |
138 | 208 | | |
139 | 209 | | |
| |||
0 commit comments