Commit 1d788e5
ARROW-337: UnionListWriter.list() is doing more than it should, this …
…can cause data corruption
The general idea is to use the "inner" writer's position to update the offset. This involves making sure various writers do indeed update their positions.
UnionListWriter.startList() should explicitly set the inner writer position in case setPosition() was called to move the union list writer's position
Author: adeneche <adeneche@dremio.com>
Closes apache#183 from adeneche/ARROW-337 and squashes the following commits:
1ae7e00 [adeneche] updated TestComplexWriter to ensure position is set properly by the various writers
7d5aefc [adeneche] ARROW-337: UnionListWriter.list() is doing more than it should, this can cause data corruption1 parent 585c74e commit 1d788e5
File tree
5 files changed
+154
-86
lines changed- vector/src
- main/codegen/templates
- test/java/org/apache/arrow/vector
- complex/writer
5 files changed
+154
-86
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 104 | + | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
| |||
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 119 | | |
128 | 120 | | |
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 124 | | |
136 | 125 | | |
137 | 126 | | |
| |||
145 | 134 | | |
146 | 135 | | |
147 | 136 | | |
| 137 | + | |
148 | 138 | | |
149 | 139 | | |
150 | 140 | | |
151 | 141 | | |
152 | | - | |
| 142 | + | |
| 143 | + | |
153 | 144 | | |
154 | 145 | | |
155 | 146 | | |
156 | 147 | | |
157 | 148 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 149 | | |
163 | 150 | | |
164 | 151 | | |
165 | 152 | | |
166 | 153 | | |
167 | 154 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 155 | + | |
| 156 | + | |
172 | 157 | | |
173 | 158 | | |
174 | 159 | | |
| |||
181 | 166 | | |
182 | 167 | | |
183 | 168 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 169 | | |
188 | | - | |
| 170 | + | |
189 | 171 | | |
190 | 172 | | |
191 | 173 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | | - | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
| |||
0 commit comments