Skip to content

Filter the missing-token preflight before its OPTIONAL - #39

Merged
ecrum19 merged 1 commit into
mainfrom
fix/missing-token-preflight-cottas
Nov 30, 2026
Merged

ecrum19 merged 1 commit into
mainfrom
fix/missing-token-preflight-cottas

Conversation

@ecrum19

@ecrum19 ecrum19 commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

What

preflight_missing_token_conformance.rq and its _count partner look for plain "." literals that should have been typed vcfc:Null. Since f43ec15 (v3.3.0) they also skip a header's own Number=. value:

OPTIONAL { ?s vcfc:attributeKey ?attributeKey }

That OPTIONAL sat in the same group as the dot filters. A group's FILTERs apply after its OPTIONAL, so the left join ran over every triple in the graph before anything was filtered.

This PR moves the dot filters into an inner group, so the OPTIONAL only joins the few rows they keep. The results are the same as before.

Why

QLever absorbs the full left join. The COTTAS engine looks up each triple's subject instead. In the v3.3.3 rerun of the core benchmark's 78 validation runs (vcf-rdfizer-testing benchmark-results/vcf-bench-3/v333-ae), this check took 1,766 s or hit the 1,800 s query timeout on COTTAS. That happened on 10,000-record expanded graphs (959k triples), where v3.1.0 took about 37 s.

Six runs in 06_equivalence were reported as MISMATCH as a result. In all six, every query answer agreed and COTTAS answered Q1–Q13.

Evidence

Check Result
COTTAS endpoint (image 3.3.3), same 10k expanded artifact Fixed count and sample queries: ~31 s each, count 0. Old count query: not finished after 600 s
New unit test Compiles both queries with rdflib and checks that the OPTIONAL's left side is the filtered pattern. It fails on the old form
Existing missing-token tests Pass: Number=. is still excluded, and a bare "." elsewhere is still reported
Full unit suite 1,280 tests, OK (24 skipped)
End to end: 06_equivalence/encoding__plain__expanded, the September command with image 3.3.3 and the two fixed queries mounted over the image's copies All 3 reports (N-Triples, HDT, COTTAS sources) are PASS, with Comunica, QLever, HDT and COTTAS all PASS and agreeing, and 13/13 comparisons equal. The preflight now takes 31 s on COTTAS, with count 0. COTTAS needed 602–624 s for its whole query set, where v3.3.3 timed out. In the v3.3.3 rerun, the same cell was MISMATCH in all 3 reports

Validation only. Conversion does not change.

🤖 Generated with Claude Code

preflight_missing_token_conformance and its count query look for plain "."
literals that should have been typed vcfc:Null. Since f43ec15 (v3.3.0) they
also skip a header's own Number=. value, through
OPTIONAL { ?s vcfc:attributeKey ?attributeKey }. That OPTIONAL sat in the
same group as the dot filters, and a group's FILTERs apply after its
OPTIONAL, so the left join ran over every triple in the graph.

QLever absorbs that, but the COTTAS engine looks up each triple's subject.
In the v3.3.3 rerun of the core benchmark's validation runs, the check took
1,766 s or hit the 1,800 s query timeout on COTTAS on 10,000-record expanded
graphs (959k triples), against about 37 s in v3.1.0. Six runs were reported
as MISMATCH although every query answer agreed.

The dot filters now sit in an inner group, so the OPTIONAL only sees the
few rows they keep. The results are unchanged. On the same COTTAS
artifact and endpoint, the count and sample queries take about 31 s (count
0), where the old count query had not finished after 600 s.

A new test compiles both queries with rdflib and checks that the
OPTIONAL's left side is the filtered pattern, not the bare triple scan. It
fails on the old form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ecrum19
ecrum19 merged commit 5994bfc into main Nov 30, 2026
24 checks passed
@ecrum19
ecrum19 deleted the fix/missing-token-preflight-cottas branch November 30, 2026 12:02
@ecrum19 ecrum19 mentioned this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants