Skip to content

Conversation

@hmottestad
Copy link
Contributor

@hmottestad hmottestad commented Dec 8, 2025

GitHub issue resolved: #5604

Briefly describe the changes proposed in this PR:


PR Author Checklist (see the contributor guidelines for more details):

  • my pull request is self-contained
  • I've added tests for the changes I made
  • I've applied code formatting (you can use mvn process-resources to format from the command line)
  • I've squashed my commits where necessary
  • every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

@hmottestad hmottestad changed the base branch from main to develop December 8, 2025 11:08
@hmottestad
Copy link
Contributor Author

@kenwenzel here is the TupleExpr to SPARQL renderer that I was talking about.

@hmottestad hmottestad requested a review from Copilot December 8, 2025 16:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new query renderer implementation for RDF4J's SPARQL query rendering system. The implementation replaces the previous renderer with an intermediate representation (IR) based approach that provides better handling of property paths, nested structures, and SPARQL syntax transformations.

Key changes:

  • New IR-based query rendering architecture with transform pipeline
  • Property path fusion and normalization transforms
  • Support for SPARQL collections, negated property sets, and complex path expressions

Reviewed changes

Copilot reviewed 144 out of 207 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ShrinkOnFailure.java Test utility wrapper for minimizing failing queries via shrinking
SPARQLQueryRenderTest.java Refactored test class removing static fields and lifecycle methods
PathTextUtilsTest.java Unit tests for path text parsing and manipulation utilities
BracesEffectTest.java Tests exploring how braces affect TupleExpr and IR representation
AlgebraExplorationTest.java Ad-hoc tests for inspecting TupleExpr algebra structures
VarUtils.java Utility class for RDF4J Var comparison and path variable recognition
TextEscapes.java Utility for escaping SPARQL string literals
TermRenderer.java Rendering helpers for IRIs and RDF4J Values
SparqlNameUtils.java SPARQL name validation helpers (prefixed names, PN_LOCAL checks)
ExprTextUtils.java Helpers for adding/removing parentheses around expression text
Transform classes Multiple transform classes implementing IR rewriting and optimization
package-info.java files Package documentation marking IR packages as experimental

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hmottestad hmottestad changed the title new query renderer implementation GH-5604 New Query Renderer implementation Dec 8, 2025
@hmottestad hmottestad marked this pull request as ready for review December 8, 2025 18:12
@hmottestad hmottestad merged commit 1fd83f7 into develop Dec 10, 2025
11 checks passed
@hmottestad hmottestad deleted the tuple-expr-to-sparql branch December 10, 2025 19:22
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