GH-4181: Validate TRIPLE argument ranges - #4182
Open
linhongyu510 wants to merge 1 commit into
Open
Conversation
Enforce the SPARQL 1.2 RDF triple constraints independently of ARQ strict mode and reject non-RDF object nodes. Update expression tests to cover invalid literal and triple-term subjects and invalid extension-node objects.
linhongyu510
marked this pull request as draft
August 31, 2026 12:01
linhongyu510
marked this pull request as ready for review
August 31, 2026 17:37
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.
GitHub issue resolved #4181
Fixes #4181.
Pull request Description:
TRIPLE()now enforces the SPARQL 1.2 RDF triple argument ranges regardless of ARQ strict mode:The implementation also fixes the invalid-subject error message to report the subject argument rather than the predicate. Regression tests cover literal and triple-term subjects plus a non-RDF extension node in object position. Existing non-strict tests were updated because SPARQL 1.2 requires these invalid tuples to raise an evaluation error unconditionally.
Verification:
The same commit was also exercised by the full repository suite:
AI Assistance Disclosure:
AI assisted with implementation review and test planning. The author reviewed the diff and ran the verification commands above.
By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.
See the Apache Jena "Contributing" guide.