fix: preserve duplicate rows in result comparisons - #709
Draft
alexanderbianchi wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compare_result_setchecked total row counts and schemas, then compared distinct canonical row strings. It therefore accepted actual[a, a, b]and expected[a, b, b]: equal totals and distinct values, but different duplicate multiplicities.Count actual/expected occurrences of each existing canonical row string using DataFusion's
HashMapwith borrowed keys. Report every mismatching row with both counts, sorting only the mismatch diagnostics for deterministic output.Validation
Using
CARGO_TARGET_DIR=/Users/alex.bianchi/.cargo/target:Ok(()); the other 9 focused tests passed.cargo test -p datafusion-distributed --lib test_utils::property_based --locked— 10 passed.cargo test -p datafusion-distributed --lib --locked— 300 passed, 1 pre-existing ignored test.cargo test -p datafusion-distributed --features integration --test multi_task_collect_join_repros --locked— 10 passed.cargo clippy -p datafusion-distributed --lib --tests --features integration --locked -- -D warnings— passed.cargo fmt --all -- --checkandgit diff --check— passed.The full integration, TPC-H, TPC-DS, ClickBench, and chaos suites were not run. Existing null/string serialization collisions and general error equivalence are intentionally outside this fix.