FAILURE MAP
← Case archive

FA-44806 / Data systems / Open access

Lateral execution drops outer rows with empty subqueries · case 01

Lateral execution drops outer rows with empty subqueries.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

lateral-binding-frames: Lateral execution drops outer rows with empty subqueries.

THE FAILURE

lateral-binding-frames: Lateral execution drops outer rows with empty subqueries.

Unsuccessful approach: A zero result value is not a null-extended unmatched row.

Case contract

For each outer [id,key] row, evaluate matching [key,value] inner rows with a minimum supplied by that outer row. Emit [id,value] in source order, preserving duplicate inner matches. Empty matches emit [id,None] under outer lateral semantics.

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:
        outer,inner=d
        result=[]
        for ident,key,minimum in outer:
            matches=[value for k,value in inner if key is not None and k==key and value>=minimum]
            if not matches: pass
            for value in matches:
                result.append([ident,value])
        return result
    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('per-row bindings', solve([[[10, 'a', 1], [11, 'b', 3]], [['a', 2], ['b', 2], ['b', 4]]]), [[10, 2], [11, 4]])
    check('same key different parameter', solve([[[10, 'a', 1], [11, 'a', 3]], [['a', 2], ['a', 4]]]), [[10, 2], [10, 4], [11, 4]])
    check('null key', solve([[[10, None, 1]], [[None, 2]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 1]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 1]], [['a', 1], ['a', 1]]]), [[10, 1], [10, 1]])
    check('empty outer', solve([[], [['a', 1]]]), [])
    check('unmatched key', solve([[[10, 'z', 1]], [['a', 2]]]), [[10, None]])
elif N == 2:
    check('per-row bindings', solve([[[10, 'a', 2], [11, 'b', 4]], [['a', 3], ['b', 3], ['b', 5]]]), [[10, 3], [11, 5]])
    check('same key different parameter', solve([[[10, 'a', 2], [11, 'a', 4]], [['a', 3], ['a', 5]]]), [[10, 3], [10, 5], [11, 5]])
    check('null key', solve([[[10, None, 2]], [[None, 3]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 2]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 2]], [['a', 2], ['a', 2]]]), [[10, 2], [10, 2]])
    check('empty outer', solve([[], [['a', 2]]]), [])
    check('unmatched key', solve([[[10, 'z', 2]], [['a', 3]]]), [[10, None]])
elif N == 3:
    check('per-row bindings', solve([[[10, 'a', 3], [11, 'b', 5]], [['a', 4], ['b', 4], ['b', 6]]]), [[10, 4], [11, 6]])
    check('same key different parameter', solve([[[10, 'a', 3], [11, 'a', 5]], [['a', 4], ['a', 6]]]), [[10, 4], [10, 6], [11, 6]])
    check('null key', solve([[[10, None, 3]], [[None, 4]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 3]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 3]], [['a', 3], ['a', 3]]]), [[10, 3], [10, 3]])
    check('empty outer', solve([[], [['a', 3]]]), [])
    check('unmatched key', solve([[[10, 'z', 3]], [['a', 4]]]), [[10, None]])
elif N == 4:
    check('per-row bindings', solve([[[10, 'a', 4], [11, 'b', 6]], [['a', 5], ['b', 5], ['b', 7]]]), [[10, 5], [11, 7]])
    check('same key different parameter', solve([[[10, 'a', 4], [11, 'a', 6]], [['a', 5], ['a', 7]]]), [[10, 5], [10, 7], [11, 7]])
    check('null key', solve([[[10, None, 4]], [[None, 5]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 4]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 4]], [['a', 4], ['a', 4]]]), [[10, 4], [10, 4]])
    check('empty outer', solve([[], [['a', 4]]]), [])
    check('unmatched key', solve([[[10, 'z', 4]], [['a', 5]]]), [[10, None]])
elif N == 5:
    check('per-row bindings', solve([[[10, 'a', 5], [11, 'b', 7]], [['a', 6], ['b', 6], ['b', 8]]]), [[10, 6], [11, 8]])
    check('same key different parameter', solve([[[10, 'a', 5], [11, 'a', 7]], [['a', 6], ['a', 8]]]), [[10, 6], [10, 8], [11, 8]])
    check('null key', solve([[[10, None, 5]], [[None, 6]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 5]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 5]], [['a', 5], ['a', 5]]]), [[10, 5], [10, 5]])
    check('empty outer', solve([[], [['a', 5]]]), [])
    check('unmatched key', solve([[[10, 'z', 5]], [['a', 6]]]), [[10, None]])
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 fixtureActualExpectedOutcome
per-row bindings[[10, 2], [11, 4]][[10, 2], [11, 4]]Passed
same key different parameter[[10, 2], [10, 4], [11, 4]][[10, 2], [10, 4], [11, 4]]Passed
null key[][[10, None]]Failed
empty inner[][[10, None]]Failed
duplicate inner[[10, 1], [10, 1]][[10, 1], [10, 1]]Passed
empty outer[][]Passed
unmatched key[][[10, None]]Failed

SHA-256 / 33b989968efc902db3d102b5ed8161a2388eeaffc4a4605f9ae1894a0f3632a3

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        outer,inner=d
        result=[]
        for ident,key,minimum in outer:
            matches=[value for k,value in inner if key is not None and k==key and value>=minimum]
            if not matches: result.append([ident,0])
            for value in matches:
                result.append([ident,value])
        return result
    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('per-row bindings', solve([[[10, 'a', 1], [11, 'b', 3]], [['a', 2], ['b', 2], ['b', 4]]]), [[10, 2], [11, 4]])
    check('same key different parameter', solve([[[10, 'a', 1], [11, 'a', 3]], [['a', 2], ['a', 4]]]), [[10, 2], [10, 4], [11, 4]])
    check('null key', solve([[[10, None, 1]], [[None, 2]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 1]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 1]], [['a', 1], ['a', 1]]]), [[10, 1], [10, 1]])
    check('empty outer', solve([[], [['a', 1]]]), [])
    check('unmatched key', solve([[[10, 'z', 1]], [['a', 2]]]), [[10, None]])
elif N == 2:
    check('per-row bindings', solve([[[10, 'a', 2], [11, 'b', 4]], [['a', 3], ['b', 3], ['b', 5]]]), [[10, 3], [11, 5]])
    check('same key different parameter', solve([[[10, 'a', 2], [11, 'a', 4]], [['a', 3], ['a', 5]]]), [[10, 3], [10, 5], [11, 5]])
    check('null key', solve([[[10, None, 2]], [[None, 3]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 2]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 2]], [['a', 2], ['a', 2]]]), [[10, 2], [10, 2]])
    check('empty outer', solve([[], [['a', 2]]]), [])
    check('unmatched key', solve([[[10, 'z', 2]], [['a', 3]]]), [[10, None]])
elif N == 3:
    check('per-row bindings', solve([[[10, 'a', 3], [11, 'b', 5]], [['a', 4], ['b', 4], ['b', 6]]]), [[10, 4], [11, 6]])
    check('same key different parameter', solve([[[10, 'a', 3], [11, 'a', 5]], [['a', 4], ['a', 6]]]), [[10, 4], [10, 6], [11, 6]])
    check('null key', solve([[[10, None, 3]], [[None, 4]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 3]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 3]], [['a', 3], ['a', 3]]]), [[10, 3], [10, 3]])
    check('empty outer', solve([[], [['a', 3]]]), [])
    check('unmatched key', solve([[[10, 'z', 3]], [['a', 4]]]), [[10, None]])
elif N == 4:
    check('per-row bindings', solve([[[10, 'a', 4], [11, 'b', 6]], [['a', 5], ['b', 5], ['b', 7]]]), [[10, 5], [11, 7]])
    check('same key different parameter', solve([[[10, 'a', 4], [11, 'a', 6]], [['a', 5], ['a', 7]]]), [[10, 5], [10, 7], [11, 7]])
    check('null key', solve([[[10, None, 4]], [[None, 5]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 4]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 4]], [['a', 4], ['a', 4]]]), [[10, 4], [10, 4]])
    check('empty outer', solve([[], [['a', 4]]]), [])
    check('unmatched key', solve([[[10, 'z', 4]], [['a', 5]]]), [[10, None]])
elif N == 5:
    check('per-row bindings', solve([[[10, 'a', 5], [11, 'b', 7]], [['a', 6], ['b', 6], ['b', 8]]]), [[10, 6], [11, 8]])
    check('same key different parameter', solve([[[10, 'a', 5], [11, 'a', 7]], [['a', 6], ['a', 8]]]), [[10, 6], [10, 8], [11, 8]])
    check('null key', solve([[[10, None, 5]], [[None, 6]]]), [[10, None]])
    check('empty inner', solve([[[10, 'a', 5]], []]), [[10, None]])
    check('duplicate inner', solve([[[10, 'a', 5]], [['a', 5], ['a', 5]]]), [[10, 5], [10, 5]])
    check('empty outer', solve([[], [['a', 5]]]), [])
    check('unmatched key', solve([[[10, 'z', 5]], [['a', 6]]]), [[10, None]])
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 fixtureActualExpectedOutcome
per-row bindings[[10, 2], [11, 4]][[10, 2], [11, 4]]Passed
same key different parameter[[10, 2], [10, 4], [11, 4]][[10, 2], [10, 4], [11, 4]]Passed
null key[[10, 0]][[10, None]]Failed
empty inner[[10, 0]][[10, None]]Failed
duplicate inner[[10, 1], [10, 1]][[10, 1], [10, 1]]Passed
empty outer[][]Passed
unmatched key[[10, 0]][[10, None]]Failed

SHA-256 / 2ae58a0de09cf879d95bd86dcfd268128e70914d8ce3bb4aad53880a92358473

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:15.902463+00:00.

Case digest / 59dc460f6347d459f9cdeea09f5ecb4268efb72b91a6dee719733960dc27aa58