W3C Conformance

This page summarizes pg_ripple's current standards evidence. Suite names do not imply that every upstream test or deployment mode is covered.

As of v0.136.0, the locked 324-case W3C SPARQL suite and the 14-query LUBM suite are required CI gates. Jena and WatDiv are additional signals. OWL 2 RL CI currently verifies only that the pinned upstream corpus can be downloaded and checksum-validated.

Test suites

pg_ripple runs these complementary qualification jobs:

SuiteTestsWhat it validates
W3C SPARQL 1.1324 locked casesRequired query and update conformance gate
Apache Jena~1 000Implementation edge cases (type coercion, date-time, blank-node scoping)
WatDiv32 checked-in templatesQuery execution against an empty database; no current scale or latency claim
LUBM14 queriesOWL RL inference correctness under ontological reasoning (v0.44.0+)
OWL 2 RL489 source casesRequired corpus acquisition and checksum check; cases are not executed by the current harness

The execution suites write reports where supported. The OWL source job uploads the validated all.rdf corpus instead of a conformance report.

See Running Conformance Tests for local setup instructions, the WatDiv Results page for performance metrics, and the LUBM Results page for OWL RL conformance details.


W3C SPARQL 1.1 test harness (v0.41.0+)

The test harness (tests/w3c/) runs a locked set of 324 cases derived from the official W3C SPARQL 1.1 test suite against a live pg_ripple installation. It runs serially because the cases share one PostgreSQL database. The checked v0.136.0 report has 324 passes and no failures, skips, or expected failures.

Per-category coverage

Sub-suiteTestsCI status
aggregates47Required
basic-update13Required
bind10Required
exists6Required
functions75Required
grouping6Required
negation12Required
project-expression7Required
property-path33Required
service7Required
subquery14Required
syntax-query94Required

Running locally

# Download test data first (one-time setup):
bash scripts/fetch_conformance_tests.sh --w3c

# Run the separate curated smoke subset:
cargo test --test w3c_smoke

# Run the locked 324-case suite serially:
cargo test --test w3c_suite -- --nocapture

Apache Jena test suite (v0.43.0+)

The Jena adapter (tests/jena/) runs ~1 000 tests from Apache Jena's sparql-query, sparql-update, sparql-syntax, and algebra sub-suites. Jena tests cover implementation edge cases that the W3C suite leaves underspecified.

Jena-specific coverage areas

AreaTests
XSD numeric promotions (xsd:integerxsd:decimalxsd:double)sparql-query
Mixed-type arithmetic and comparisonssparql-query
Timezone-aware xsd:dateTime comparisonssparql-query
Date/time built-ins: NOW(), YEAR(), MONTH(), DAY(), HOURS(), MINUTES(), SECONDS(), TZ()sparql-query
xsd:decimal arithmetic: ROUND(), CEIL(), FLOOR(), ABS()sparql-query
Blank nodes in CONSTRUCT templatessparql-query
Blank-node identity across OPTIONAL and GRAPH boundariessparql-query
String functions: STRLEN(), SUBSTR(), UCASE(), LCASE(), STRSTARTS(), STRENDS(), CONTAINS(), ENCODE_FOR_URI(), CONCAT()sparql-query
SPARQL UPDATE edge casessparql-update
Syntax acceptance / rejection (positive/negative syntax tests)sparql-syntax
Algebra normalisation equivalencesalgebra

CI status

The jena-suite CI job is non-blocking until pass rate ≥ 95%, then promoted to required. Known failures for type-coercion and date-time edge cases are tracked in tests/conformance/known_failures.txt with the jena: prefix.

Running locally

# Download Jena test data:
bash scripts/fetch_conformance_tests.sh --jena

# Run the full Jena suite:
cargo test --test jena_suite

SPARQL 1.1 Query

Test suite: W3C SPARQL 1.1 Query test suite (2013-03-27)

Gate: all 324 locked cases must pass.

Supported features

FeatureStatus
Basic Graph Patterns (BGP)Supported
FILTER with all comparison and logical operatorsSupported
OPTIONALSupported
UNIONSupported
Subqueries (SELECT … { SELECT … })Supported
BINDSupported
VALUESSupported
Property paths (/, `, *, +, ?, ^`)
Negated property sets (`!(p1p2)`)
Aggregates: COUNT, SUM, AVG, MIN, MAXSupported
GROUP BY, HAVINGSupported
ORDER BY, LIMIT, OFFSETSupported
DISTINCTSupported
ASKSupported
CONSTRUCTSupported
DESCRIBESupported
Named graphs (GRAPH ?g { … })Supported
Federated query (SERVICE)Supported (v0.16.0)
All XPath/SPARQL built-in functions (STR, STRLEN, UCASE, LCASE, STRSTARTS, STRENDS, CONTAINS, REGEX, ABS, CEIL, FLOOR, ROUND, IF, COALESCE, isIRI, isLiteral, isBlank, DATATYPE, LANG, BIND)Supported
Language-tagged literals (storage and LANG() function)Supported
Typed literals with xsd:integer, xsd:decimal, xsd:double, xsd:dateTime, xsd:booleanSupported
NOT EXISTSSupported
MINUSSupported
RDF-star (quoted triples, SPARQL-star BGP)Supported (v0.4.0)

Known limitations

FeatureStatus
langMatches() functionNot supported. Returns 0 rows without error. Full BCP 47 language tag matching is planned for a future release.
Custom aggregate extensions (property functions)Not supported. Standard aggregates (COUNT, SUM, AVG, MIN, MAX) are fully supported.
Variable-inside-quoted-triple patterns (<< ?s ?p ?o >>)Returns 0 rows with a WARNING. Ground quoted-triple patterns work.
LOAD <url> from arbitrary HTTP URIsNetwork-access dependent; supported via pg_ripple_http companion service.

SPARQL 1.1 Update

Test suite: W3C SPARQL 1.1 Update test suite (2013)

Target: ≥ 95% of applicable tests pass.

Supported features

FeatureStatus
INSERT DATASupported
DELETE DATASupported
INSERT WHERESupported
DELETE WHERESupported
DELETE/INSERT WHERESupported
CLEAR GRAPHSupported
CREATE GRAPH / DROP GRAPHSupported
Multi-statement updates (; separator)Supported
Named graph update operationsSupported
Idempotent re-insert (ON CONFLICT DO NOTHING)Supported

Known limitations

FeatureStatus
COPY, MOVE, ADD graph operationsSupported.
LOAD <url>Same as for queries above.

SHACL Core

Test suite: W3C SHACL Core test suite

Target: ≥ 95% of SHACL Core tests pass.

Supported constraints

ConstraintStatus
sh:targetClassSupported
sh:targetNodeSupported
sh:targetSubjectsOfSupported
sh:targetObjectsOfSupported
sh:property with sh:pathSupported
sh:minCount / sh:maxCountSupported
sh:datatypeSupported
sh:pattern (regex)Supported
sh:minLength / sh:maxLengthSupported
sh:minInclusive / sh:maxInclusiveSupported
sh:minExclusive / sh:maxExclusiveSupported
sh:in (enumeration)Supported
sh:hasValueSupported
sh:classSupported
sh:nodeKind (IRI, BlankNode, Literal)Supported
sh:orSupported
sh:andSupported
sh:notSupported
sh:node (nested shape reference)Supported
sh:qualifiedValueShape + sh:qualifiedMinCount / sh:qualifiedMaxCountSupported
Async validation pipeline (process_validation_queue)Supported
Sync mode (insert rejection)Supported

Known limitations

FeatureStatus
SHACL Advanced Features (SPARQL-based constraints, sh:SPARQLConstraint)Deferred to v0.21.0.
SHACL-AF (rules, sh:TripleRule)Partial implementation via Datalog; full SHACL-AF integration planned.

Running the conformance gate

The conformance tests run as part of the standard pg_regress suite:

cargo pgrx regress pg18 --postgresql-conf "allow_system_table_mods=on"

The relevant test files are:

  • tests/pg_regress/sql/w3c_sparql_query_conformance.sql
  • tests/pg_regress/sql/w3c_sparql_update_conformance.sql
  • tests/pg_regress/sql/w3c_shacl_conformance.sql
  • tests/pg_regress/sql/crash_recovery_merge.sql