Commit ac23689
fix: Address PR #5 critical review issues
**Rust FFI Null Handling (Critical)**:
- Fixed: Null bitmap now properly included in ArrayData buffers
- Int64, Float64, Int32: Add validity buffer when null_count > 0
- Utf8/String: Add validity buffer to [validity, offsets, data] array
- Issue: Previously allocated null_bitmap but never used, causing null value corruption
- Impact: Arrow invariants violated, incorrect null interpretation
**ArrayData Validation (Critical)**:
- Fixed: Changed build_unchecked() to build() with proper error handling
- All numeric and string types now validate buffer configuration
- Errors propagated back to C++ code instead of panicking
- Impact: Prevents undefined behavior from invalid Arrow structures
**Pre-existing Compilation Errors (Critical)**:
- Fixed: schema.metadata().cloned() -> .clone() (not iterator)
- Fixed: Schema wrapped in Arc for RecordBatchIterator
- Fixed: WriteParams wrapped in Some() for Dataset::write()
- Fixed: Removed unnecessary mut from buffers variables
- Impact: Code now compiles successfully
**Script Corrections (High)**:
- verify_phase1.sh: --output → --output-dir (line 61)
- verify_phase1.sh: SCALE_FACTOR=0.1 → SCALE_FACTOR=1 (CLI accepts integers)
- phase1_lance_benchmark.sh: Default scale factors 0.1 → 1 (line 16)
- phase1_lance_benchmark.sh: --output → --output-dir (line 63, 82)
- Impact: Scripts now work correctly with CLI
**Test Coverage**:
- ✅ Rust code compiles without errors
- ✅ Full C++ build succeeds
- ✅ All Arrow structure validation in place
This addresses the critical issues from PR #5 review. Additional fixes
(UUID detection, CMake portability, comprehensive tests) can follow.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 30125bd commit ac23689
3 files changed
Lines changed: 53 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | | - | |
| 155 | + | |
149 | 156 | | |
150 | | - | |
| 157 | + | |
| 158 | + | |
151 | 159 | | |
152 | 160 | | |
153 | 161 | | |
| |||
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
160 | 175 | | |
161 | 176 | | |
162 | | - | |
| 177 | + | |
163 | 178 | | |
164 | | - | |
| 179 | + | |
| 180 | + | |
165 | 181 | | |
166 | 182 | | |
167 | 183 | | |
| |||
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
174 | 196 | | |
175 | 197 | | |
176 | | - | |
| 198 | + | |
177 | 199 | | |
178 | | - | |
| 200 | + | |
| 201 | + | |
179 | 202 | | |
180 | 203 | | |
181 | 204 | | |
| |||
198 | 221 | | |
199 | 222 | | |
200 | 223 | | |
201 | | - | |
202 | | - | |
| 224 | + | |
| 225 | + | |
203 | 226 | | |
204 | 227 | | |
205 | 228 | | |
| |||
231 | 254 | | |
232 | 255 | | |
233 | 256 | | |
234 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
235 | 265 | | |
236 | 266 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 267 | + | |
241 | 268 | | |
242 | | - | |
| 269 | + | |
| 270 | + | |
243 | 271 | | |
244 | 272 | | |
245 | 273 | | |
| |||
551 | 579 | | |
552 | 580 | | |
553 | 581 | | |
554 | | - | |
| 582 | + | |
555 | 583 | | |
556 | 584 | | |
557 | 585 | | |
| |||
619 | 647 | | |
620 | 648 | | |
621 | 649 | | |
622 | | - | |
| 650 | + | |
623 | 651 | | |
624 | 652 | | |
625 | 653 | | |
| |||
632 | 660 | | |
633 | 661 | | |
634 | 662 | | |
635 | | - | |
| 663 | + | |
636 | 664 | | |
637 | 665 | | |
638 | 666 | | |
| |||
0 commit comments