8759: AvroError enum for arrow-avro crate #16
Bugbot Review
Bugbot Analysis Progress (2m 36s elapsed)
✅ Gathered PR context (2s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 2 potential bugs found (2m 21s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 2 bugs reported (11s)
✅ Analysis completed successfully (0s)
Final Result: Bugbot completed review and found 2 potential issues
Request ID: serverGenReqId_93406c2f-be5e-444c-8ed0-1e5028543473
Details
Bug: Wrong Index Corrupts Sync Marker Data
The sync marker write index calculation is incorrect. The code uses 16 - to_decode instead of 16 - self.bytes_remaining to determine where to write bytes in the 16-byte sync marker array. This causes bytes to be written to the wrong positions. For example, when bytes_remaining = 16 and to_decode = 5, bytes are written to positions 11-15 instead of 0-4, corrupting the sync marker data.
arrow-avro/src/reader/block.rs#L114-L116
arrow-rs/arrow-avro/src/reader/block.rs
Lines 114 to 116 in b40bb9c