FA-45266 / Data systems / Open access
Partition scan deduplicates identical physical rows · case 01
Partition scan deduplicates identical physical rows.
ROOT CAUSE
partition-column-injection: Partition scan deduplicates identical physical rows.
THE FAILURE
partition-column-injection: Partition scan deduplicates identical physical rows.
Unsuccessful approach: Adjacent duplicate rows are still real source rows.
Case contract
Read ordered file fragments [partition-values,physical-rows] under a projection of field names. Partition values override stale physical columns of the same name; unprojected fields disappear, missing fields become None, and physically empty fragments do not synthesize rows.
Why this case matters
A bounded deterministic data engine model makes representation and changelog faults reproducible.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
fragments,projection=d
out=[]
for partition,rows in fragments:
for row in rows:
merged=dict(row)
merged.update(partition)
out.append([merged.get(name) for name in projection])
return [r for i,r in enumerate(out) if r not in out[:i]]
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 1}]]], ['v', 'p']]), [[1, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 1}]], [{'p': 'b'}, [{'v': 2}]]], ['p', 'v']]), [['a', 1], ['b', 2]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 1}]]], ['v', 'x']]), [[1, None]])
check('duplicate rows', solve([[[{}, [{'v': 1}, {'v': 1}]]], ['v']]), [[1], [1]])
check('duplicate projection', solve([[[{}, [{'v': 1}]]], ['v', 'v']]), [[1, 1]])
check('no fragments', solve([[], ['v']]), [])
elif N == 2:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 2}]]], ['v', 'p']]), [[2, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 2}]], [{'p': 'b'}, [{'v': 3}]]], ['p', 'v']]), [['a', 2], ['b', 3]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 2}]]], ['v', 'x']]), [[2, None]])
check('duplicate rows', solve([[[{}, [{'v': 2}, {'v': 2}]]], ['v']]), [[2], [2]])
check('duplicate projection', solve([[[{}, [{'v': 2}]]], ['v', 'v']]), [[2, 2]])
check('no fragments', solve([[], ['v']]), [])
elif N == 3:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 3}]]], ['v', 'p']]), [[3, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 3}]], [{'p': 'b'}, [{'v': 4}]]], ['p', 'v']]), [['a', 3], ['b', 4]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 3}]]], ['v', 'x']]), [[3, None]])
check('duplicate rows', solve([[[{}, [{'v': 3}, {'v': 3}]]], ['v']]), [[3], [3]])
check('duplicate projection', solve([[[{}, [{'v': 3}]]], ['v', 'v']]), [[3, 3]])
check('no fragments', solve([[], ['v']]), [])
elif N == 4:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 4}]]], ['v', 'p']]), [[4, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 4}]], [{'p': 'b'}, [{'v': 5}]]], ['p', 'v']]), [['a', 4], ['b', 5]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 4}]]], ['v', 'x']]), [[4, None]])
check('duplicate rows', solve([[[{}, [{'v': 4}, {'v': 4}]]], ['v']]), [[4], [4]])
check('duplicate projection', solve([[[{}, [{'v': 4}]]], ['v', 'v']]), [[4, 4]])
check('no fragments', solve([[], ['v']]), [])
elif N == 5:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 5}]]], ['v', 'p']]), [[5, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 5}]], [{'p': 'b'}, [{'v': 6}]]], ['p', 'v']]), [['a', 5], ['b', 6]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 5}]]], ['v', 'x']]), [[5, None]])
check('duplicate rows', solve([[[{}, [{'v': 5}, {'v': 5}]]], ['v']]), [[5], [5]])
check('duplicate projection', solve([[[{}, [{'v': 5}]]], ['v', 'v']]), [[5, 5]])
check('no fragments', solve([[], ['v']]), [])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| partition overrides | [[1, 'new']] | [[1, 'new']] | Passed |
| multiple fragments | [['a', 1], ['b', 2]] | [['a', 1], ['b', 2]] | Passed |
| empty fragment | [] | [] | Passed |
| missing projected | [[1, None]] | [[1, None]] | Passed |
| duplicate rows | [[1]] | [[1], [1]] | Failed |
| duplicate projection | [[1, 1]] | [[1, 1]] | Passed |
| no fragments | [] | [] | Passed |
SHA-256 / a459329602c126557b944d301af32106d563d3418f27c385e1703fe0b7aa0a41
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
fragments,projection=d
out=[]
for partition,rows in fragments:
for row in rows:
merged=dict(row)
merged.update(partition)
out.append([merged.get(name) for name in projection])
return [r for i,r in enumerate(out) if i==0 or r!=out[i-1]]
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 1}]]], ['v', 'p']]), [[1, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 1}]], [{'p': 'b'}, [{'v': 2}]]], ['p', 'v']]), [['a', 1], ['b', 2]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 1}]]], ['v', 'x']]), [[1, None]])
check('duplicate rows', solve([[[{}, [{'v': 1}, {'v': 1}]]], ['v']]), [[1], [1]])
check('duplicate projection', solve([[[{}, [{'v': 1}]]], ['v', 'v']]), [[1, 1]])
check('no fragments', solve([[], ['v']]), [])
elif N == 2:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 2}]]], ['v', 'p']]), [[2, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 2}]], [{'p': 'b'}, [{'v': 3}]]], ['p', 'v']]), [['a', 2], ['b', 3]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 2}]]], ['v', 'x']]), [[2, None]])
check('duplicate rows', solve([[[{}, [{'v': 2}, {'v': 2}]]], ['v']]), [[2], [2]])
check('duplicate projection', solve([[[{}, [{'v': 2}]]], ['v', 'v']]), [[2, 2]])
check('no fragments', solve([[], ['v']]), [])
elif N == 3:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 3}]]], ['v', 'p']]), [[3, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 3}]], [{'p': 'b'}, [{'v': 4}]]], ['p', 'v']]), [['a', 3], ['b', 4]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 3}]]], ['v', 'x']]), [[3, None]])
check('duplicate rows', solve([[[{}, [{'v': 3}, {'v': 3}]]], ['v']]), [[3], [3]])
check('duplicate projection', solve([[[{}, [{'v': 3}]]], ['v', 'v']]), [[3, 3]])
check('no fragments', solve([[], ['v']]), [])
elif N == 4:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 4}]]], ['v', 'p']]), [[4, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 4}]], [{'p': 'b'}, [{'v': 5}]]], ['p', 'v']]), [['a', 4], ['b', 5]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 4}]]], ['v', 'x']]), [[4, None]])
check('duplicate rows', solve([[[{}, [{'v': 4}, {'v': 4}]]], ['v']]), [[4], [4]])
check('duplicate projection', solve([[[{}, [{'v': 4}]]], ['v', 'v']]), [[4, 4]])
check('no fragments', solve([[], ['v']]), [])
elif N == 5:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 5}]]], ['v', 'p']]), [[5, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 5}]], [{'p': 'b'}, [{'v': 6}]]], ['p', 'v']]), [['a', 5], ['b', 6]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 5}]]], ['v', 'x']]), [[5, None]])
check('duplicate rows', solve([[[{}, [{'v': 5}, {'v': 5}]]], ['v']]), [[5], [5]])
check('duplicate projection', solve([[[{}, [{'v': 5}]]], ['v', 'v']]), [[5, 5]])
check('no fragments', solve([[], ['v']]), [])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| partition overrides | [[1, 'new']] | [[1, 'new']] | Passed |
| multiple fragments | [['a', 1], ['b', 2]] | [['a', 1], ['b', 2]] | Passed |
| empty fragment | [] | [] | Passed |
| missing projected | [[1, None]] | [[1, None]] | Passed |
| duplicate rows | [[1]] | [[1], [1]] | Failed |
| duplicate projection | [[1, 1]] | [[1, 1]] | Passed |
| no fragments | [] | [] | Passed |
SHA-256 / b0cf2727fc0ce23f674a33a09fc97f3f1a4900c3ff5361806565d6ac74ac657c
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:44:20.455331+00:00.
Case digest / c35d9dcd371d46831bafa575c40b85f802833a62cb681d8e79a4b8aa9ae571e4