andygrove commented on PR #5034: URL: https://github.com/apache/datafusion-comet/pull/5034#issuecomment-5092490598
Thanks for the thorough review, @comphead — all five gaps addressed in 7ef6420c6: - **Gap 1 (multi-partition)** — added `SELECT uuid(42) FROM test_uuid_parts DISTRIBUTE BY id` in `uuid_with_seed.sql`, backed by a 32-row `range(0, 32)` table so uuid runs post-shuffle and exercises `partitionIndex != 0`. - **Gap 2 (aliased projections)** — `SELECT uuid(0) = uuid(0) FROM test_uuid_seed` in `uuid_with_seed.sql`, plus `SELECT uuid() = uuid() FROM test_uuid` in `uuid.sql` under `spark_answer_only` (unseeded aliases produce distinct fresh seeds). - **Gap 3 (empty batch)** — new Rust test `test_uuid_empty_batch_does_not_advance_state`: evaluate on a zero-row batch must not consume RNG draws; the next non-empty batch must match a fresh generator. - **Gap 4 (golden fixture)** — new Rust test `test_uuid_matches_commons_math3_random_uuid_generator` pinning 5 × 5 UUIDs across seeds 0, -1, `Long.MinValue`, `Long.MaxValue`, and 42. Values captured directly from Commons Math3's `MersenneTwister` — the exact RNG behind `RandomUUIDGenerator` — so a `next_long` regression (high/low swap, wrong mask, sign-extension bug in `set_seed_long`) fires without a JVM roundtrip. - **Gap 5 (no-scan path)** — added `SELECT length(uuid(0))` alongside the existing `SELECT uuid(0)` to pin the `OneRowRelation` path with a deterministic assertion. Dropped the `typeof(uuid(...))` variant: Spark 4.1 codegen fails to compile that expression with `Unknown variable or type "string"` under the SQL fixture's config; `length()` gives us the deterministic pin without touching that path. Verified locally: all 5 Rust unit tests pass; both SQL fixtures pass on Spark 4.1 (default) and Spark 3.5 (the seeded fixture is correctly skipped). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
