Skip to content

feat: extend SPARQL evaluator with comprehensive function and operator support#945

Merged
cybermaggedon merged 1 commit into
release/v2.5from
feature/additional-sparql-support
May 21, 2026
Merged

feat: extend SPARQL evaluator with comprehensive function and operator support#945
cybermaggedon merged 1 commit into
release/v2.5from
feature/additional-sparql-support

Conversation

@cybermaggedon

Copy link
Copy Markdown
Contributor

Add 30+ SPARQL 1.1 built-in functions and the MINUS algebra operator to the custom SPARQL query backend.

String functions:

  • SUBSTR (2-arg and 3-arg forms), STRBEFORE, STRAFTER
  • REPLACE (regex with flags), ENCODE_FOR_URI

Numeric functions:

  • FLOOR, CEIL, ROUND, ABS

Date/time accessors:

  • YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS
  • NOW, TZ

Hash functions:

  • MD5, SHA1, SHA256, SHA512

Term constructors:

  • IRI/URI, BNODE, UUID, STRUUID

Other functions:

  • LANGMATCHES, RAND
  • EXISTS / NOT EXISTS (with async pre-evaluation to bridge the sync expression evaluator and async algebra evaluator)

Algebra:

  • MINUS set-difference operator
  • HAVING already works via rdflib's Filter mapping (verified)

Fix SPARQL ORDER handling

Includes 653 lines of new unit tests covering all added functionality across expressions, solutions, and algebra layers.

…r support

Add 30+ SPARQL 1.1 built-in functions and the MINUS algebra operator to the
custom SPARQL query backend.

String functions:
- SUBSTR (2-arg and 3-arg forms), STRBEFORE, STRAFTER
- REPLACE (regex with flags), ENCODE_FOR_URI

Numeric functions:
- FLOOR, CEIL, ROUND, ABS

Date/time accessors:
- YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS
- NOW, TZ

Hash functions:
- MD5, SHA1, SHA256, SHA512

Term constructors:
- IRI/URI, BNODE, UUID, STRUUID

Other functions:
- LANGMATCHES, RAND
- EXISTS / NOT EXISTS (with async pre-evaluation to bridge the
  sync expression evaluator and async algebra evaluator)

Algebra:
- MINUS set-difference operator
- HAVING already works via rdflib's Filter mapping (verified)

Fix SPARQL ORDER handling

Includes 653 lines of new unit tests covering all added functionality
across expressions, solutions, and algebra layers.
@github-actions

Copy link
Copy Markdown

Contributor License Agreement ✅

All contributors have signed the CLA. Thank you!

@cybermaggedon

Copy link
Copy Markdown
Contributor Author

Tests pass in dev env

@cybermaggedon cybermaggedon merged commit 2c3a699 into release/v2.5 May 21, 2026
3 checks passed
@cybermaggedon cybermaggedon deleted the feature/additional-sparql-support branch May 21, 2026 09:50
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.

1 participant