mbutrovich commented on PR #12062: URL: https://github.com/apache/arrow-rs/pull/12062#issuecomment-6927644503
I ran the [`arith`](https://github.com/mbutrovich/arrow-pbt/blob/81bb9db1e6cf65bdff8114b8bb4e7b144ed92e10/src/props.rs#L1340-L1559) property from [arrow-pbt](https://github.com/mbutrovich/arrow-pbt) against this PR at aee0225d39, which contains `main` at d65329d3e7. It passed seeds 1 to 18 at 10,000 cases each, with one case discarded as the known #11604 (decimal `div` at the native minimum). `arith` calls all eight `numeric` kernels on every integer and decimal width, `Decimal256` included, on two arrays and with a scalar on either side, and checks each row against [exact `BigInt` arithmetic](https://github.com/mbutrovich/arrow-pbt/blob/81bb9db1e6cf65bdff8114b8bb4e7b144ed92e10/src/props.rs#L1209-L1284). A checked kernel must fail if and only if a valid row overflows, and when it fails, each row is rerun on its own. Decimal `add_wrapping`, `sub_wrapping` and `mul_wrapping` are checked the same way, since they return the overflow error. The right side of a decimal operation can have another precision and scale, so the rescaled path runs too. The inputs put random values under null slots and slice arrays to nonzero offsets, and they draw values that fit in a narrower width, values just past it, and the type's limits ([strategy](https://github.com/mbutrovich/arrow-pbt/blob/81bb9db1e6cf65bdff8114b8bb4e7b144ed92e10/src/cases.rs#L324-L365)). The new paths were reached. Of the decimal `add`, `sub` and `mul` calls in the run, 210,359 returned a result, and in 20,394 of those only null slots overflowed. Another 31,954 returned the error because a valid row overflowed. The property checks that a call errors, but not which error it returns. To rerun it, put each arrow-rs crate in arrow-pbt's `.cargo/config.toml` on `{ git = "https://github.com/apache/arrow-rs", rev = "refs/pull/12062/head" }` and run: ```sh ARROW_PBT_REASONS=1 cargo run -q -- run arith 1-18 10000 ``` -- 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]
