fix(sparql-anything): accept an empty output as no triples unless --load could not be checked - #836
Merged
Merged
Conversation
ddeboer
force-pushed
the
fix/all-filtered-chunk
branch
from
September 9, 2026 17:09
0ef4c6a to
cc84d95
Compare
…oad could not be checked - A missing or unparseable chunk makes SPARQL Anything exit non-zero, which already aborts the run; only a missing --load file exits 0, and then a query that reads only loaded data writes an empty output - Check each job’s load file once, before any process runs: a relative path resolves against workDir on both sides, so a missing or empty one fails there, naming the file - Accept an empty output as no triples, unless the job’s load is an absolute path this process cannot see; a missing output still fails - Drop the chunkless-job rule, which encoded one caller’s query
ddeboer
force-pushed
the
fix/all-filtered-chunk
branch
from
September 10, 2026 08:57
cc84d95 to
09422dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
convert()rejected any process whose--outputwas empty, on the assumption that SPARQL Anything exits 0 whenever it cannot read an input. A chunk whose rows the query filters out entirely writes a 0-byte output too, and was then reported as an unreadable input, aborting the run.Measured on v1.2.0 and v1.2.0-RC1, the assumption is narrower than that. A missing or unparseable chunk makes SPARQL Anything exit 1, which the converter already turns into a failed run. The one input it does not fail on is
--load: a missing file is logged, the query runs without the data, and the exit code is 0. A query that reads only loaded data (the GeoNames ontology job) then writes an empty output, indistinguishable from a query whoseFILTERmatched nothing.So the converter now checks the one file that matters, once per job and before any process starts:
loadpath is relative toworkDirfor the task runner and the converter alike, so a missing or empty one fails then, naming the file.loadpath is the runner’s – under a container’s mount, say – and one the converter cannot find on its own side proves nothing, so the job runs and an empty output from it still fails.Chunks are not checked: SPARQL Anything fails on them itself, and a 0-byte chunk still yields the Facade-X root. The earlier rule that a job without chunks could never produce an empty output is gone as well; it encoded what one caller’s query happens to return.
Docs updated under “Loading existing RDF” and “How a conversion runs”.
Fix #820