Key retraction misfires on deletion-heavy diffs: weigh matched-row agreement

オープン
#46 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust
領域
data

調査の方向性

SDVB IMDB mixed_mixed_removal_rows2 ケースを再現し、change_mass と一致行の合意に関する pass-one のキー撤回ロジックを追跡します。削除が支配的な diff で一致行が正常な場合は正しいキーが保持され、一致行が大きく食い違うキーは引き続き撤回できれば完了です。リグレッションカバレッジとして WINE_small のケースを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Problem

When a guessed key is correct but the diff is dominated by row deletions, change_mass counts dropped rows in full, pushing changed mass past MAX_PLAUSIBLE_CHANGE_PERCENT (50%). The correct key is then retracted as excessive_change, and the second guess can land on a structurally-unique but semantically wrong column.

Reproducer from the SDVB benchmark (IMDB mixed_mixed_removal_rows2, 800 → 47 rows, a genuine 94% row deletion):

# declared key: honest answer
table_key([Series_Title], basis: declared)
row_drop(rows: 753)

# guessed key: retraction misfires
key_retracted([Series_Title], reason: excessive_change)
----
table_key([Overview], basis: guessed, overlap: 1.00)
table_regenerate()

The retracted key was producing the better diff; the re-guess on Overview (free text, unique on both sides) yields table_regenerate() — strictly less informative.

Proposed signal

The two cases the retraction trigger must distinguish leave different evidence in pass one:

  • Wrong key: matched rows disagree heavily in their cells.
  • Right key + massive deletion: matched rows are essentially clean; the change mass comes entirely from dropped rows.

In the example above, the 47 matched rows under Series_Title had ~zero changed cells, fully corroborating the key. A refinement: retract only when the matched rows themselves disagree heavily, or exempt deletion-dominated mass when matched rows are clean.

Found while running data-diff against the SDVB benchmark; also affects the WINE_small key_retracted cases (3 pairs).

主要言語
Rust
スター
34
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hadley/data-diff のほかの issue

hadley/data-diff の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。