Join semi result check
join-semi-result-check · version 1.0.0 · Numbers & math · free, no key needed
Check a claimed ordered semi-join index result and report its first discrepancy.
Use when you need to: check claimed semi-join result · validate ordered semi-join pairs · find first wrong semi-join row.
Decide before calling
Read the versioned contract and the supported scope below. Reuse join-semi-result-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use join-semi-result-check@1.0.0 for check claimed semi-join result. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- check claimed semi-join result
- validate ordered semi-join pairs
- find first wrong semi-join row
- audit semi-join output certificate
- verify duplicate-key semi-join order
- compare claimed semi-join indices
Not supported
- compute or return a replacement joined table
- evaluate arbitrary SQL predicates or expressions
- coerce key types or treat nulls as equal
Behavior
- Rows are compared by own-property keys; key values are null, strings, booleans, or exact JSON safe integers. No coercion occurs. Null never matches, including null against null.
- Nested-loop order is deterministic: ascending left index, then ascending right index. Duplicates produce distinct pairs. LEFT emits one null right index for an unmatched left row; SEMI emits each matching left index once.
- claimed_rows is a certificate, not row data: inner/left entries identify source pairs; semi entries identify source left rows. The first missing, unequal, or extra entry is reported and the claim is never repaired.
- Input objects must be ordinary plain objects with own properties. Unknown fields, inherited/prototype-polluted objects, missing join keys, unsupported key types, non-safe integers, and out-of-range certificate indices are invalid_input.
- Reference version: ISO/IEC 9075-2:2023 §7.7 + deep24 deterministic-order profile 1.0.0.
Input
left_rows(array of object, required): max items 200right_rows(array of object, required): max items 200left_key(string, required): min length 1; max length 64right_key(string, required): min length 1; max length 64claimed_rows(array of object, required): max items 40000
Output
valid(boolean, required)reason(one of "result_mismatch", null, required)discrepancy(null or object, required)reference_version(constant "ISO/IEC 9075-2:2023 §7.7 + deep24 deterministic-order profile 1.0.0", required)
Limits
- max left rows: 200
- max right rows: 200
- max claimed rows: 40000
- max comparisons: 40000
- max key chars: 64
- max input bytes: 1048576
Example
Request input:
{
"left_rows": [
{
"id": 1
},
{
"id": 2
}
],
"right_rows": [
{
"id": 2
},
{
"id": 2
}
],
"left_key": "id",
"right_key": "id",
"claimed_rows": [
{
"left_index": 1
}
]
}
Response:
{
"result": {
"valid": true,
"reason": null,
"discrepancy": null,
"reference_version": "ISO/IEC 9075-2:2023 §7.7 + deep24 deterministic-order profile 1.0.0"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "join-semi-result-check",
"version": "1.0.0",
"input": {
"left_rows": [
{
"id": 1
},
{
"id": 2
}
],
"right_rows": [
{
"id": 2
},
{
"id": 2
}
],
"left_key": "id",
"right_key": "id",
"claimed_rows": [
{
"left_index": 1
}
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/join-semi-result-check/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"left_rows":[{"id":1},{"id":2}],"right_rows":[{"id":2},{"id":2}],"left_key":"id","right_key":"id","claimed_rows":[{"left_index":1}]}'
The machine-readable contract is at /v1/tools/join-semi-result-check/versions/1.0.0.
CLI
node cli.mjs run join-semi-result-check 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Join inner result check: Check a claimed ordered inner join index result and report its first discrepancy.
- Join left result check: Check a claimed ordered left join index result and report its first discrepancy.
- Dedupe first check: Check an exact first-wins SameValueZero deduplication claim and report its first discrepancy.
- Dedupe keyed check: Check an exact keyed Map deduplication claim and report its first discrepancy.
- Dedupe last check: Check an exact last-wins SameValueZero deduplication claim and report its first discrepancy.
- Permutation indices check: Check whether claimed indices are exactly one occurrence of every source index, reporting the first discrepancy.