shiavm006 opened a new pull request, #960: URL: https://github.com/apache/mahout/pull/960
Replace `.expect()` with `.ok_or_else()` for overflow checks in Arrow IPC reader to return a proper `Result` error instead of panicking Fix unchecked multiplication in `List` branch that could also overflow Fixes #942 On 32-bit systems, `usize::MAX = 4,294,967,295`. With realistic quantum ML inputs: - 20 qubits → `current_size = 2^20 = 1,048,576` - With `batch.num_rows() = 4,096`: `1,048,576 × 4,096 = 4,294,967,296` → overflows Using `.expect()` causes a panic, which crashes the program. The fix returns a `Result` error that callers can handle gracefully. This follows the same pattern used in `tensorflow.rs` (lines 84–89). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
